你好,我想發出的自動消息不和諧,但我不斷收到以下錯誤發送消息: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'文檔嗎? –