/euler

The official William's Math Team™ discord bot

Primary LanguageRustCreative Commons Zero v1.0 UniversalCC0-1.0

euler

euler is a discord bot for the William's Math Team™ discord server.

Features

  • Query ChatGPT
  • Grab McGill course information
  • Train on random Leetcode problems

Development

You'll need cargo installed on your machine to spawn the various components the project needs to run locally.

  1. 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.

  1. 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.

  1. 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.

  1. Run the bot with an appropriate log level set:
RUST_LOG=info cargo run