This Telegram bot enables compiling and running code snippets in various programming languages using an online code compiler API.
- This project was inspired by fswair's CPP17 Compiler. Special thanks for their amazing work!
- Compile code in multiple languages.
- Optionally provide input through stdin.
- View output, memory usage, and CPU time.
- Share the code in the chat you want using the button.
- Clone the repository:
git clone https://github.com/suphiozturk8/CodeCompiler.git && cd CodeCompiler
- Install dependencies:
pip install -r requirements.txt
- Set up your Telegram bot token in the
config.py
file. - Run the bot:
python main.py
- Use the
/run
command followed by the language and code snippet. - Optionally use
/stdin
to provide input through stdin. /run <language> <code or reply_code_text or reply_code_document> [/stdin <stdin>]
Examples:
/run python3 print("Hello, World! 👻")
/run python3 print(input("Enter your name: ")) /stdin Suphi
To use in inline mode, mention the bot followed by the language and code snippet:
@bot_username <language> <code> [/stdin <stdin>]
- Fork the repository.
- Create a new branch:
git checkout -b feature/new-feature
. - Make your changes and commit:
git commit -m "Add new feature"
. - Push to the branch:
git push origin feature/new-feature
. - Submit a pull request.
This project is licensed under the MIT License.