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
d.js toolkit
d.js toolkit9mo ago
- 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 staff
chewie
chewie9mo ago
you tell us we don't know your code, you are deleting messages somewhere in your code
push0
push0OP9mo ago
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
chewie
chewie9mo ago
search for .delete in your code
push0
push0OP9mo ago
can i somehow make a scan on the source?
chewie
chewie9mo ago
what
push0
push0OP9mo ago
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
NyR
NyR9mo ago
What editor are you using? Most editors allow searching specific keywords in your source
push0
push0OP9mo ago
mobaxterm
NyR
NyR9mo ago
Hmm, looking through google, it seems it's a ssh client and not a code editor I only know what I got from google
push0
push0OP9mo ago
it is, but i look at the source by that cuz its connected tru vps the source its called the mobatexteditor
push0
push0OP9mo ago
No description
NyR
NyR9mo ago
I wouldn't know then, maybe try using vscode or something or a proper IDE
chewie
chewie9mo ago
You can connect most modern code editors and IDEs via SSH or FTP.
push0
push0OP9mo ago
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
chewie
chewie9mo ago
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.
push0
push0OP9mo ago
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( :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
chewie
chewie9mo ago
that is, in fact, not the part of the code
push0
push0OP9mo ago
Yup it is Thats the event
chewie
chewie9mo ago
its the event, but that error doesnt match the code you provided.
push0
push0OP9mo ago
I think its the embed that makes the error?...
chewie
chewie9mo ago
The error points to channel 1176250354833313861, but you are exclusively checking for channel 1026481185297268828
push0
push0OP9mo ago
cuz he sends the embed with the error but then istantly gets deleted and crashes
chewie
chewie9mo ago
so it cant be the code
push0
push0OP9mo ago
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?
chewie
chewie9mo ago
ok
push0
push0OP9mo ago
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
chewie
chewie9mo ago
can you show the full code of that event
push0
push0OP9mo ago
you saw the video? i sent you in dm
Want results from more Discord servers?
Add your server