0
const Discord = require('discord.js');
const testBot = new Discord.Client();
const config = require("./config.json");
const args = message.content.slice(prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
testBot.on("message", (message) => {
if(command === 'help') {
message.channel.send('ok');
} else
if (command === 'hey') {
message.channel.send('yes?');
}
});
testBot.on('ready',() => {
console.log('I am ready!');
})
testBot.login("Secret");
我是一個node.js初學者。Discord.js消息未定義
錯誤是這樣的。 'ReferenceError:消息未定義'我該如何解決?
謝謝。