My discord bot will not respond to commands when I type them in a server with the bot while being hosted on Glitch.
Here is the name of the project: tidy-saffron
hey @salface – it looks like Glitch support removing your invite url (because it can give people access to private things, like .env tokens) but if you share the project name we can take a look!
@househaunt Oh, oops. The name of my project is tidy-saffron.
Hey @salface,
I could not find this project. Are you sure this is the name?
Yes. I had just accidentally had it set to private, my bad.
Just change it back to a public project and I shall take a look.
Hey @salface,
I got the Discord bot working by doing the following:
-
Remove the
client.login(YOUR_TOKEN_HERE);
statement on line 7 as only one is needed. -
Update your package.json:
{
"name": "Example",
"description": "Example",
"version": "0.0.0",
"main": "bot.js",
"scripts": {
"start": "node bot.js"
},
"dependencies": {
"discord.js": "11.1.0",
"request": "2.81.0"
},
"engines": {
"node": "8.x"
}
}
Typing *breathe
in the Discord server should give you this response:
1 Like
@khalby786, Thank you so much for your help!
1 Like