euler is a discord bot for the William's Math Team™ discord server.
- Query ChatGPT
- Grab McGill course information
- Train on random Leetcode problems
You'll need cargo installed on your machine to spawn the various components the project needs to run locally.
- Create a new discord application in the developer portal, and then navigate to the Bot tab to grab your bot token.
Additionally, you'll want to check the Message Content Intent present within the Bot interface.
- Add the bot to your server by navigating to the following url in your browser:
https://discord.com/api/oauth2/authorize?client_id=<CLIENT_ID>&permissions=0&scope=bot%20applications.commands
Where CLIENT_ID
is found by navigating to the OAuth2 tab in the developer
portal.
- Set the following environment variables:
DISCORD_BOT_TOKEN=
OPENAI_API_KEY=
Where DISCORD_BOT_TOKEN
is the token you grabbed in the first step.
n.b. Your OpenAI key is required if you'd like for ChatGPT queries to work.
- Run the bot with an appropriate log level set:
RUST_LOG=info cargo run