代码如下: bot.on('guildMemberAdd', member => {}); 这会导致以下错误: (node:11760) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannotsendmessages to this user
如果我有这个错误,它将发送一条嵌入的消息,并显示有关如何打开直接消息的图片。if (error.code === 50007){}reason: DiscordAPIError: Cannotsendmessages to this user
at C:\Users\nawap\OneDrive\Desktop\Discord\bot all\nirtogiven\nod
我有Discord.js自定义的表情符号错误--看起来很简单,但是如何修复呢?我想要定制的表情符号嵌入,它的工作。但是当我对定制的表情符号做出反应时,机器人不会给我任何东西。Error: (node:20548) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannotsendmessages to this user) => {
if (reaction.emoji.name ===
我正在创建一个新的命令,发送给作者一条消息,但是,当作者的DM关闭时,它会给我错误的DiscordAPIError: Cannotsendmessages to this user return message.channel.send("DMs closed."); message.author.send
现在的问题是:如果由于服务器重新启动或类似的原因,机器人曾经崩溃,那么编辑它在崩溃之前发送的消息将产生错误:(node:6672) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot edit a message authored by another user
现在我不能直接去检查是否是author.id === client.id,因为这显然只会返回true。
我试过“尝试”,但它不起作用,DiscordAPIError: Cannotsendmessages to this user await client.users.cache.get(`${id}`).send('hello',{ });
let messageEmbed1 = await client.users.cache.get(`${id}`).send({emb