你好,我想发出的自动消息不和谐,但我不断收到以下错误发送消息:Discord.js以1个分钟的间隔
bot.sendMessage is not a function
我不能确定,为什么我”米得到这个错误,下面是我的代码;
var Discord = require('discord.js');
var bot = new Discord.Client()
bot.on('ready', function() {
console.log(bot.user.username);
});
bot.on('message', function() {
if (message.content === "$loop") {
var interval = setInterval (function() {
bot.sendMessage(message.channel, "123")
}, 1 * 1000);
}
});
我刚刚意识到 - 你在看'discord.io'文档吗? –