我想向机器人添加一个功能,以私下联系用户,并在参数中使用他的 id。
我已经尝试过了:
sendMessage(idUser, "mesage")
但它不起作用。
我有这个错误:
“未定义发送消息”
我想向机器人添加一个功能,以私下联系用户,并在参数中使用他的 id。
我已经尝试过了:
sendMessage(idUser, "mesage")
但它不起作用。
我有这个错误:
“未定义发送消息”
Yeah message.author.send("MESSAGE")
should work
Also a little handy tip \n
makes a new line if your making lines of text :D
Try message.author.send("Your message here");
This 获取已发送消息的作者并向他们发送消息。
但是请注意,在 discord.js 中 sendMessage 会被贬低。相反,只需使用发送。