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...
DT
d.js toolkitโ€ข44d 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
C
chewie ๐ŸŒˆโ€ข44d ago
you tell us we don't know your code, you are deleting messages somewhere in your code
P
push0โ€ข44d 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
C
chewie ๐ŸŒˆโ€ข44d ago
search for .delete in your code
P
push0โ€ข44d ago
can i somehow make a scan on the source?
C
chewie ๐ŸŒˆโ€ข44d ago
what
P
push0โ€ข44d 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
N
NyRโ€ข44d ago
What editor are you using? Most editors allow searching specific keywords in your source
P
push0โ€ข44d ago
mobaxterm
N
NyRโ€ข44d 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
P
push0โ€ข44d ago
it is, but i look at the source by that cuz its connected tru vps the source its called the mobatexteditor
P
push0โ€ข44d ago
No description
N
NyRโ€ข44d ago
I wouldn't know then, maybe try using vscode or something or a proper IDE
C
chewie ๐ŸŒˆโ€ข44d ago
You can connect most modern code editors and IDEs via SSH or FTP.
P
push0โ€ข44d 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
C
chewie ๐ŸŒˆโ€ข44d 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.
P
push0โ€ข44d 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
C
chewie ๐ŸŒˆโ€ข44d ago
that is, in fact, not the part of the code
P
push0โ€ข44d ago
Yup it is Thats the event
C
chewie ๐ŸŒˆโ€ข44d ago
its the event, but that error doesnt match the code you provided.
P
push0โ€ข44d ago
I think its the embed that makes the error?...
C
chewie ๐ŸŒˆโ€ข44d ago
The error points to channel 1176250354833313861, but you are exclusively checking for channel 1026481185297268828
P
push0โ€ข44d ago
cuz he sends the embed with the error but then istantly gets deleted and crashes
C
chewie ๐ŸŒˆโ€ข44d ago
so it cant be the code
P
push0โ€ข44d 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?
C
chewie ๐ŸŒˆโ€ข44d ago
ok
P
push0โ€ข44d 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
C
chewie ๐ŸŒˆโ€ข44d ago
can you show the full code of that event
P
push0โ€ข44d ago
you saw the video? i sent you in dm
Want results from more Discord servers?
Add your server
More Posts
im still new to all this and cant install node.js to discord and need some help if possibleim sorry for asking this but all videos are so confusing and dont show all the stepsmember.setNickname or member.roles.add occasionally not workingHi all, What reasons are there for a nickname potentially not being applied, or a role potentially I have an error in my botHello, sorry for the inconvenience, but I have a problem with my bot, since it turns off due to an eButton QuestionHow can i make a button never expire?Commands not refreshing after being correctly deployedGood evening. I'm developing a discord.js bot using typescript. I am having trouble using my deployeguild.guildScheduledEventUserAdd event failing to fire consistentlyI am having an issue with the guildScheduledEventUserAdd event. It seems to trigger sometimes but whWhere do I start from?Hi, Can y'all share some helpful resouces with me so that I can understand and learn about npmjs?? THelp me plsCode: Error: `[WARNING] The command at C:\Users\OE104655\Videos\Eendsmp bot\commands\utility\giveawHelp me plsIdk whats wrong with this line of code: `const client = new Client({ intents: [GatewayIntentBits.Guiis it possible to run command 1 from command 2so like command 1 is /embed title: description: And i want to run that command with pre-set values fHow do I add a role with discord.js```js const target = interaction.options.getUser('target'); const role = interaction.options.getRolecheck if role is set to certain role idshow do i check if the role is set to certain ids? ```js const role = interaction.optHow do you turn on a discord bot?It ain't onErrorroot@VPS-10384:~/7bLogsBot# node index node:internal/modules/cjs/loader:1137 throw err; ^ ErrorTypeErrorCode: `const guild = bot.guilds.cache.get(process.env.GUILD_ID);` Error: `TypeError: Cannot read Modal โ€” PaginationHi! To construct my bot, I wanted to use modals allowing user reply. But my number of fields is moreduplicated interactionsokay i need help, because i have been hititng my head against the wall abt this for days. my interacMaintaining connection after restarting nodeI have a bot that would connect to a channel and play sounds. I have a slash command that would playMessages: combining selectors and input fieldsHey, Is it possible for example with modals or messages to have a combination of inputs for free texSet embed color to the role color for the bot?Is there a way to set the color of an embedded message to the color of the bot's primary role in a s