A custom-built Discord bot for the Northeastern Class of 2025 Discord server.
All current commands are documented in COMMANDS.md
. Source files are located in src/commands
.
All configuration is stored in config.json
. The shape should look like this:
{
"discord": {
"token": "ABCD01293ndsljfjlkejw.YLFp_A.ZZFJDSKFL312f",
"appId": "098765432123456789"
},
"mongodb": {
"url": "mongodb://admin:[email protected]:27017/?authSource=admin&readPreference=primary&ssl=false",
"db": "example" // A unique database prefix to prevent conflicts. The bot creates a new database for every server ID: e.g., "example-123456789098765432".
}
}
.gitignore
file to be ignored by Git.
.
├── COMMANDS.md
├── package.json
├── README.md (this)
└── src
├── commands
├── database
├── Discord
├── triggers
└── config.ts
How to set up Hoosky Bot locally
- Make sure your computer has
git
, and run
git clone [email protected]:nu25/hoosky-bot.git
in the directory where you want to clone the bot.
-
Ensure Node.js and NPM (the package manager for Node.js) are installed. Install from here: https://nodejs.org/en/
-
In the code folder, run
npm install
to install all necessary dependencies and libraries.
- You're done!
-
Turn on Developer Mode by going to your Discord settings > "Advanced" > "Developer Mode".
-
Create a new Discord server for testing the bot yourself. Right click on the server icon and "Copy ID". Save this somewhere.
-
Go to https://discord.com/developers/applications and click "New Application". Enter any name. Click "Copy" under "Application ID", and save this somewhere.
-
On the left panel, click "Bot" and then "Add Bot". On the Bot page, click "Copy" to copy the bot's token. Save this somewhere.
-
Go to "OAuth2", and in the "Scopes" section, check "bot" and "applications.commands". Scroll down to "Bot Permissions" and check "Administrator". Click "Copy" to copy the generated URL.
-
Navigate to the copied URL and invite the bot to your test server.
-
You're done!
-
Set 3 environment variables:
APPLICATION_ID
, with your saved application ID;DISCORD_TOKEN
, with your saved bot token; andGUILD_ID
, with your saved server ID. -
In the code folder, run
npm start
- The bot should now be running in your server!
-
We'll use GitHub Pull Requests to merge your changes onto the
main
anddev
branches, so commit your changes onto your own branch. -
Branch naming: name your branches as
<username>/tiny_description
.