【发布时间】:2018-11-19 07:50:07
【问题描述】:
我想给机器人添加一个功能,用参数中的 id 私下联系用户。
我已经试过了:
sendMessage(idUser, "mesage")
但它不起作用。
我有这个错误:
"sendMessage 未定义"
【问题讨论】:
-
您需要提供更多详细信息,您到目前为止已经尝试过什么
-
我试过这个:bot.sendMessage(user, "my message"); bot.message(用户,“我的消息”);我想知道是否可以使用此 ID 在私信中联系用户,因为我没有找到有关 userId 私信的任何信息
-
您需要添加更多代码,以便我们了解问题所在
-
const Discord = require('discord.js') const bot = new Discord.Client() bot.on('message' function(message)){ sendMessage( auserid , "HELLO WORLD")您不需要其余的代码。
标签: javascript bots discord.js private-messaging