A personal discord.py utility bot for Linux.
Ensure you have at least python3.9. Bot functionality is not guaranteed with earlier versions of python.
Clone this repository and make it your current working directory:
git clone https://github.com/Majixed/magic && cd ./magic/Install dependencies. If you are using a virtual environment, preferably name it .venv:
pip install -r requirements.txtAdd your bot token to a .env file in the same directory:
echo "TOKEN=<your bot's token>" > .envTo use the TeX commands, install a distribution of TeX Live from the TUG Website or your Linux distro's package manager.
A prerequisite for using TeX commands is poppler-utils, which provides the pdftocairo command for image conversion. To install on Ubuntu:
sudo apt install poppler-utilsCopy config/config-example.py as config/config.py in the same directory. This will be the configuration file. You may edit the values in this file if you wish:
cp config/config-example.py config/config.pyFinally, start up the bot:
./magicMake sure you have given the bot the privileged Message Content intent in the Discord Developer Portal, otherwise it may not be able to respond to the prefix and some features may not work.
The bot's default prefix is -, you can change it by editing the prefix variable in config/config.py. Run -help in discord to get a list of all its commands.
If you have any suggestions or queries, feel free to open an issue.
I borrowed some code from the Paradøx discord bot, check out their repo here.