Hallo,
ich habe einen Discord Bot geschrieben, aber er geht nicht online. Das hier ist der Fehlercode:
Und hier die Codes:
const Discord = resquire('discord.js');
const prefix = '/'
const client = new Discord.Client({
allsowedMentions: {
parse: [`users`, `roles`],
repliedUser: true,
},
intents: [
"Guilds",
"GuildMessages",
"GuildPresences",
"GuildMembers",
"GuildMessageReactions",
],
});
client.on("ready", () => {
console.log("Bot is online!")
})
client.on('message', message => {
if (!message.content.startsWith(prefix) || message.author.bot)
return;
const args = message.content.slice(prefix.lenght).split(/ +/);
const command = args.shift().toLowerCase();
// test command
if (command === 'test') {
message.channel.send('The bot is currently working')
}
})
client.login("Bleibt geheim")
Kann mir bitte jemand helfen?