A Discord bot which uses the Discord.js Library, with this bot we're using a Command Handler
You'll need:
- A Discord account
- Permission to add accounts to a server, or your own server
- Git, Node.js (atleast latest 12.x release) and NPM or PNPM if using this on your machine
- Remix the app on Glitch
- Create an App here: https://discordapp.com/developers/applications/me
- Create an App Bot User for your App by clicking "Create a Bot User"
- Add the App Bot User to your Discord server using this link:
https://discordapp.com/oauth2/authorize?&client_id=<CLIENT ID>&scope=bot&permissions=2146958591
replacing<CLIENT_ID>
with the Client ID found on the page of your App - Set the
TOKEN
value in.env
using the Bot User token ("click to reveal" in the App page under the bot username)
- Fork the app from the GitLab mirror.
- Under Continuous Integration/Continuous Development settings in your fork, find Variables. Besides it, click
Expand
to show options.
- Fork this app from mirrored GitLab or GitHub one then clone to your machine.
When any of these deployment methods are accomplished, we'll run the code first in bootup.sh
before the bot boots up, which may cause downtimes and CPU spikes (mostly happens on Glitch).
Unlike bots which store commands in bot.js, this bot stores commands in the commands folder.
For now the prefix is !
, You can change it in the .env
file.
We're using the Discord.js library to interact with the Discord API.
To check if the bot is working, check the logs to find "Connected to Discord API!"