(Proper name TBD)
This project is undergoing rapid development and should be considered experimental. Use it at your own risk. 🤙
This list is updated as contributors contribute.
This project requires NodeJS (version 16.10 or later), NPM. To make sure you have them available on your machine, try running the following command:
$ npm -v && node -v
7.20.3
v16.15.1
$ cd path/to/parent
$ git clone https://github.com/BYU-CS-Discord/CSBot.git
$ cd CSBot
Note that, by running this bot, you agree to be bound by the Discord's Developer Terms of Service and Developer Policy, as well as this project's own license. With that in mind, you'll need a token for a Discord bot account. See this awesome tutorial on how to get one.
Create a file called .env
in the root of this project folder. Paste your token into that file, and fill in other config items as desired:
# .env
DISCORD_TOKEN=YOUR_TOKEN_GOES_HERE
# required, token for your Discord bot
# TODO: Document other configurations as needed
Do not commit this file to git or your bot will get "hacked".
Go to https://discordapi.com/permissions.html#378091424832 and paste in your bot's client ID to get an invite link.
Be sure to install dependencies, and run a quick lint to generate needed files:
$ npm ci
$ npm run lint
The first time you download the source, and each time the source code changes, you'll need to run this command before you run the bot:
$ npm run build
If you want support for Discord Slash Commands, you'll need to deploy the commands directly. To avoid rate limits, use a command-line tool, rather than deploying on startup.
Once you have your bot's account token in the .env file, run the following command to tell Discord about our commands:
$ npm run commands:deploy
Since this bot is just a Node script, any Node process manager will do.
$ node .
# or
$ npm start
# or
$ pm2 start .
Prints the list of commands.
This project is entirely open-source. Do with it what you will. If you're willing to help me improve this project, consider filing an issue.
See CONTRIBUTING.md for ways to contribute.
This project's source is licensed under the Unlicense license. All contributions thereto are given to the public domain.