This is the bot that runs the pilgrims event in UW CSE 2024. Note: Pilgrim Bot currently does not support users crossing multiple servers with Pilgrim Bot on it
node
, use latest version over LTS!npm install
to install packages specified in package.json
Connect your bot to your server following these steps
NOTE: For development it's probably easiest to just give your bot admin privileges.
Create a file named .env in the root folder of this project.Use the syntax KEY_NAME=VALUE_SOMETHING (similar to bash stuff) inside the .env file to set
the following environment variables the bot needs to run: |
KEY_NAME | Description |
---|---|---|
token |
The bot's token, comes from step where you created bot | |
prefix |
The prefix for bot commands. If empty bot will not respond to any messages | |
mongoURI |
Your own local development mongoURI | |
pilgrimRoleId |
Discord ID of the role to be pinged for pilgrimages* | |
weisCornerId |
Discord ID of the channel for that pilgrimages occur in * |
* These IDs can be obtained by setting Discord to developer mode (User Settings > Advanced > Developer Mode)
Some commands update a mongoDB database. For development you should setup your own database to access and manipulate. Thankfully mongoDB provides free clusters that are more than sufficient for the small databasing done here.
mongoURI
key in your .env
. Your bot should now be able to
access Mongo.After this you should be good to run the bot!
Run the bot by running node index.js
(or node .
to save on keystrokes) in the project root directory.
You should see Pilgrims is online!
output to the console.
Try typing !help
(replacing the !
with whatever prefix you set in your .env
) in the server you have
the bot in. It should DM you a list of its commands.