Execute code automatically in Discord
This project is created with:
- Piston API: v2
- DiscordPy: 1.6.0
- Python-Levenshtein: 0.12.0
- whats-that-code: 0.1.11
- PyYAML 5.3.1
This discord bot simply attempt to execute every code block it can see securely using Piston API. It works best when the message author specifies a language. If they do not, the bot attempts to recognize it using whats-that-code, but may fail. If no runnable code is detected or the execution of the code results in an error, the bot will remain silent. Otherwise, the code's output is printed to a message
To run this project, first download it and install the requirements with pip3 install -r requirements.txt
.
Then, generate and paste your discord bot token in ./config.yml
You can generate one at the Discord Developer Portal
Simply starting the program with python3: python3 bot.py
will automatically start the bot, provided the token is correct
Token: <TOKEN>