【发布时间】:2021-02-07 12:46:00
【问题描述】:
当我尝试使用 DM 中的机器人回复用户时,我收到以下错误:Discord.Js - Uncaught DiscordAPIError: Cannot send messages to this user
有什么问题?
代码:
client.on('message', message=>{
if(!message.author.send('$$')) return
if(message.author.send('$$')){
message.channel.send('Hi! Please describe your message to get help with it.').catch(error => {
message.channel.send('I was unable to send a message.')
})
}
【问题讨论】:
-
他们要么屏蔽了你,要么不接受来自非朋友的 dms
-
我允许了这些消息,但它仍然显示此错误...
标签: javascript discord discord.js bots