【发布时间】:2022-01-10 13:21:19
【问题描述】:
const Discord = require("discord.js");
const client = new Discord.Client({ ws: { intents: new Discord.Intents(Discord.Intents.ALL) } });
这是一个需要所有意图的代码是不是错了
client.once('ready', () => {
console.log('Coleria is online!');
});
const prefix = '*'
我可以用这个前缀吗
client.on("message", message =>{
if(!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(" ");
const command = args.shift().toLowerCase();
if(command === 'sa'){
messageCreate.channel.send('As kardeşim hoşgeldin.');
}
});
client.login("my token");
【问题讨论】:
标签: javascript discord.js bots