A Discord bot that generates LaTeX equations from text inputs and converts them into PNG images for easy sharing. Powered by Google Generative AI Gemini Model.
- Create a New Application:
- Visit the Discord Developer Portal.
- Click
New Application
and provide a name.
- Create a Bot:
- Under
Bot
, clickAdd Bot
. - Save your token and add it to the
.env
file.
- Under
- Create a
.env
file with the following variables:TOKEN=your-discord-bot-token GUILD_ID=your-guild-id GOOGLE_API_KEY=your-google-api-key
- Install MacTeX: Download and install MacTeX
- Install Python Requirements: Run the following command:
pip install -r requirements.txt
- Install MiKTeX: Download and install MiKTeX
- Install Python Requirements: Run:
pip install -r requirements.txt
- Install TeX Live:
- Debian/Ubuntu:
sudo apt install texlive
- Fedora/Red Hat:
sudo dnf install texlive
- Debian/Ubuntu:
- Install Python Requirements:
pip install -r requirements.txt
- Install TeX Live: Same as Linux instructions above.
- Install Python Requirements: Follow Linux instructions.
- Sign up at Google Generative AI API
- Create a project and an API key.
- Enable the Generative Language API and add the key to your
.env
file.
- Start the bot by running the Python script:
python bot.py
For details on docker instructions look at the docker.md file
- Ensure your
.env
file has correct values. - Check if all software dependencies are correctly installed.
Contributions are welcome! Please submit issues or pull requests to improve this bot.