My discord bot doesnt get online my code is
const Discord = require(‘Discord.js’)
const client = new Discord.client()
client.on (“message”, message => {
if (message.content === “sudo_heck_bank”) {
return message.chanel.send(“you_have_0$_in_your_bank_account”)
}
})
client.login(“the token”)
can you help me
Change “Discord.js” to “discord.js” and hopefully it will work
Edit: Also to let you know, your bot needs the “Message” intent (you can enable it where you get your token. More info here!
This also means setting the client intent
- const client = new Discord.client();
+ const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES] });
1 Like
Can you share the logs of the project? We can’t help you otherwise.
it says:
parse error: Expected separator between values at line 8, column 14
system
Closed
6
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.