DiscordAPIError[10008]: Unknown Message
}
/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:640
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^
DiscordAPIError[10008]: Unknown Message
at handleErrors (/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:1021:23)
at async SequentialHandler.queueRequest (/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:862:14)
at async REST.request (/root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async MessageManager.delete (/root/bots/Synth/node_modules/discord.js/src/managers/MessageManager.js:255:5)
at async Message.delete (/root/bots/Synth/node_modules/discord.js/src/structures/Message.js:816:5) {
requestBody: { files: undefined, json: undefined },
rawError: { message: 'Unknown Message', code: 10008 },
code: 10008,
status: 404,
method: 'DELETE',
url: 'https://discord.com/api/v10/channels/1176250354833313861/messages/1214873265689075772'
}
i dont touch my bot since decades and i dont remember how discordjs works, i would like to understand where the "url" is placed at so i can replace it cuz this one is outdated...
29 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffyou tell us
we don't know your code, you are deleting messages somewhere in your code
i dont remember it either thats the main issue ahahah, i tried to look somewhere on the search bar for the 1176250354833313861 channel or message but doesnt pop up anywhere
tried to look on the message.js, index, messagemanager
i dont get it where i could've put it
search for .delete in your code
can i somehow make a scan on the source?
what
so i can instantly find it
make a scan on the source
like
something that scans the entire source for look at the result "1176250354833313861" or ".delete" without looking at everything manually
What editor are you using? Most editors allow searching specific keywords in your source
mobaxterm
Hmm, looking through google, it seems it's a ssh client and not a code editor
I only know what I got from google
it is, but i look at the source by that cuz its connected tru vps the source
its called the mobatexteditor
I wouldn't know then, maybe try using vscode or something or a proper IDE
You can connect most modern code editors and IDEs via SSH or FTP.
what you guys reccomend me then?
i want something that has an internal editor
like moba
and where i can connect via ssh
ssh and sftp
This is very much out of scope of this support channel.
I suggest you ask in one of the general coding servers from #useful-servers.
good suggestion by the way
ok i checked, the code is right and i fixed the channelid issue and allat, but it still makes the same error, basically the code consist in making the people not write on a specified channel and makes a message that says "you cant send messages on this channel"
basically all the events that are plugged tru discord.js are not working
and makes the bot crash
why?..
if (message.channel.id === '1026481185297268828') { //stanza media
if (message.attachments.size === 0) {
if (message.author.id === '1137118836970229770' || message.author.id === '701439469265354773')
console.log("Messaggio in media mandato dagli owner");
else {
const embedDesc = ':redexclamation: | Puoi postare solo media in questo canale, non è abilitata la conversazione.';
message.guild.channels.cache.get('1026481185297268828').messages.fetch({ limit: 100 })
.then(messages => {
const messagesToDelete = messages.filter(m => (m.embeds.length > 0 ) && m.embeds[0].description === embedDesc);
console.log(messagesToDelete)
if (!messagesToDelete.size > 0) {
const cannotSend= new EmbedBuilder()
.setTitle('Attenzione')
.setDescription(
message.channel.send({ embeds: [cannotSend], }).then((msg) => { setTimeout(() => { msg.delete(msg); }, 60000); }) } message.delete(message); }) .catch(console.error);
}
} } thats the part of the code
:redexclamation: | Puoi postare solo **media** in questo canale, non è abilitata la conversazione.
)
.setColor('#ff1b1b')
.setFooter({ text: 'Herion Community', iconURL: ${message.guild.iconURL()}
});
message.channel.send({ embeds: [cannotSend], }).then((msg) => { setTimeout(() => { msg.delete(msg); }, 60000); }) } message.delete(message); }) .catch(console.error);
}
} } thats the part of the code
that is, in fact, not the part of the code
Yup it is
Thats the event
its the event, but that error doesnt match the code you provided.
I think its the embed that makes the error?...
The error points to channel 1176250354833313861, but you are exclusively checking for channel 1026481185297268828
cuz he sends the embed with the error but then istantly gets deleted and crashes
so it cant be the code
I changed the channel bro
its another one
thats the right one :/
and at that point i have no idea
cuz i noticed that its not only that event
but its every event with an embed from discord.js
When the bot gets the imput of sending the message with that embed it sends it but weirdly deletes it istantly and crashes
do you want a video so i can show?
ok
The channels are right..
Give me a moment ill hop on pc
@chewie 🌈 can i send you the video in dms? it contains the root ip of the vps and client id
i dont wanna leak it to everyone yk
can you show the full code of that event
you saw the video?
i sent you in dm