-1

我想向机器人添加一个功能,以私下联系用户,并在参数中使用他的 id。

我已经尝试过了:

sendMessage(idUser, "mesage")

但它不起作用。

我有这个错误:

“未定义发送消息”

4

2 回答 2

0

Yeah message.author.send("MESSAGE") should work

Also a little handy tip \n makes a new line if your making lines of text :D

于 2018-06-13T21:17:23.183 回答
0

Try message.author.send("Your message here"); This 获取已发送消息的作者并向他们发送消息。

但是请注意,在 discord.js 中 sendMessage 会被贬低。相反,只需使用发送。

于 2018-06-10T15:27:46.920 回答