1

Whenever I send an embed (either myself or another bot), my main bot auto deletes them and I'm not sure why, I do get an error multiple times:

(node:3568) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Message at RequestHandler.execute (C:\Users\person\Desktop\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:154:13) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async RequestHandler.push (C:\Users\person\Desktop\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:39:14) at async MessageManager.delete (C:\Users\person\Desktop\Discord Bot\node_modules\discord.js\src\managers\MessageManager.js:126:5) (Use node --trace-warnings ... to show where the warning was created)

Here is my main code file: https://pastebin.com/RGbLXyNN

The weird thing is that it doesn't delete normal images or text unless it meets the profanity or link filter, but anything regarding embeds it just deletes immediately, regardless if a bot or person send it.

2 Answers 2

0

This might be something on the server not the bot, make sure the Embed Links option is turned on. This is probably not the bot, just the server. If it’s not I don’t know what else could cause this.

0

If I am correct, Discord.js takes embeds as links, so your link filter is deleting them. If you want to ignore messages sent by your bot, use this:

if(message.author.bot) return;

Insert that line right in the beginning of all your message handlers, it should do the trick.

Not the answer you're looking for? Browse other questions tagged or ask your own question.