https://github.com/mischa-d/guild-tracker-discord-bot
A Discord bot providing utilty to keep track of guild activity, performance and blacklists for any game
https://github.com/mischa-d/guild-tracker-discord-bot
discord-bot discord-js gaming-community guilds
Last synced: about 1 month ago
JSON representation
A Discord bot providing utilty to keep track of guild activity, performance and blacklists for any game
- Host: GitHub
- URL: https://github.com/mischa-d/guild-tracker-discord-bot
- Owner: Mischa-D
- License: gpl-3.0
- Created: 2025-02-28T20:18:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-02T11:27:25.000Z (over 1 year ago)
- Last Synced: 2025-03-02T12:27:45.728Z (over 1 year ago)
- Topics: discord-bot, discord-js, gaming-community, guilds
- Language: TypeScript
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discord Bot Template (Discord.js)
## Setup
- create a Discord Bot on the [Discord Developer Portal](https://discord.com/developers/applications)
- add a .env file under `src` with the following contents:
```
TOKEN=the Token of your new bot
CLIENT_ID=Application ID of your bot
```
- make sure you have `npm` installed
- run
```
npm install
npm run register
```
## Start
The bot can be started by running `npm start`. It will then serve requests from any Discord server it was added to, until stopped.
## How to add commands
Any file under [./src/commands](./src/commands/) is interpreted as a command file. It will need to have a default export implementing the [ICommand](./src/types/ICommand.ts) interface. There is an example command, but there is much more you can do.
If you have more complicated commands that might error, you can `throw` a [CustomError](./src/errors/CustomError.ts), which will forward its error message to the user. Error messages of regular errors will be replaced by a generic error.
You should also adapt the [createEmbedTemplate](./src/utils/embedutils.ts) utility function to your needs.