This repository contains a Discord bot that serves as a language translator for programming languages like Python, Java, and C++. It enables users to write code in these languages, execute it, and receive results directly through Discord commands.
- Code Execution: Run Python, Java, and C++ code snippets.
- Multi-language Support: Supports three major programming languages.
- Real-time Feedback: Get instant results for the code executed in the Discord chat.
- Error Handling: Provides error messages and debugging help if the code fails to compile or execute.
- Python
- Java
- C++
- Discord API: To manage interactions between users and the bot.
- Python: Used for building the bot's core logic and executing Python code.
- Java and C++: Executed in a secure environment from the bot.
-
Clone the repository:
git clone https://github.com/KAJOiq/Discord-tasks.git
-
Navigate to the project directory:
cd Discord-tasks -
Install dependencies:
pip install -r requirements.txt
-
Set up your environment by creating a
.envfile and adding your Discord bot token:DISCORD_TOKEN=your-bot-token-here -
Run the bot:
python bot.py
- Run Python Code: Use the
/runpython [code]command to execute Python code. - Run Java Code: Use the
/runjava [code]command to execute Java code. - Run C++ Code: Use the
/runcpp [code]command to execute C++ code. - Error Handling: The bot will return any compilation or runtime errors along with suggestions.
If you'd like to contribute, feel free to fork the repository and submit pull requests with new features or bug fixes.
This project is licensed under the MIT License.
For questions or support, you can reach out through GitHub.