Overview • Get to the bot • Usage • Development
Judge0Bot is a Discord bot for interacting with the Judge0 API. It executes source code of near 20 programming languages directly in the Discord channel chat.
The bot is hosted and this means that you can use its commands from a Discord server. Three of the ways of interacting with our bot in the Discord platform:
- Invite the bot in your server. You can invite the bot in servers which you manage with this invite link.
- Use the bot from our support server. You can use the bot from our Judge0 support server. Join the server here.
- Use the bot from programming servers. The bot is included in large IT related communties. discord.py, ITBG
The bot is quite easy and straightforward for use. There is integrated
help command in the bot. Send ;help
in the chat and the bot will send helpful
information for usage.
The code execution is done through sending a language command and passing the source code.
You can view all language commands after sending ;languages
in the chat.
Every language command have three use cases (Python example):
;python print("Executing source code")
This command will execute the passed source code and it will return an output embed which includes information like time and memory usage and output which includes standart output, standart error, compiler message and sandbox message if any.
;python
If a language command is send without source code it will return an useful guide how to pass the source code. There are three methods: passing source code in plain format, passing soure code in code block or passing source code in highlighted code block.
;python -v
If argument -v
is passed instead of source code it will return the version of the language.
It is highly preferable if you don't run an instance of this bot unless you want to contribute.
The installation and running steps are as follows:
- Make sure to get git and Python 3.6 or higher
This is required to clone the repository and actually run the bot.
- Clone the repository
git clone https://github.com/judge0/discord-bot.git
- Enter the directory
cd discord-bot
- Install Pipenv
python -m pip install pipenv
- Install dependencies
pipenv install --dev
- Run the bot
Bot token passed like command-line argument:
pipenv run start <token>
Bot token set as enviorment variable BOT_TOKEN:
pipenv run start