All-purpose Discord bot.
- A Discord account
- Permission to add accounts to a server, or your own server
Right now, I've only allowed the bot to let me invite it, but this is how it'd work if I made the bot public in the app settings:
- Invite bot using this invitation link.
- Make sure the bot is online.
- If not, something that wasn't your fault bugged out.
If it's working, you should see "Ready!" in the Glitch logs.
- Remix the project
- Register a Discord app
- Fill out the basics and ignore the redirect stuff
- Click Create a Bot User
- Copy your bot token, not your client secret, and paste it into your
.env
- Your bot's invitation link is
https://discordapp.com/oauth2/authorize?&client_id={{CLIENT_ID}}&scope=bot&permissions=0
.env
- Use your own client token
server.js
- Change the trigger command(s)
- Change the bot reply
watch.json
- Include or exclude more files, file types or folders
- Change update rate (
throttle
)
- https://glitch.com/~discord-bot-example
- https://abal.moe/Eris/
- https://anidiotsguide.gitbooks.io/discord-js-bot-guide/other-guides/hosting-on-glitchcom.html
- https://watch-json.glitch.me/
It's probably asleep. Try waking it either by
- Typing a command in your server
- Updating some code in your Glitch project
- Remember to check the logs
- Visiting its glitch.me page
Also check whether the Discord invitation link still works.
Check out "Hosting a Bot on Glitch.com" linked above in Resources for more on keeping your sleepy bot awake.
The tricky thing about hosted bots is finding the sweet spot between poking them enough to stay awake and overworking them to the point of exhaustion.
Be nice to your bots.