Sandboxed code execution discord bot.
Invite the bot!
Not all languages are enabled on the public bot.
>```cpp
#include <iostream>
int main()
{
std::cout << "Hello World!" << std::endl;
}
```
>`py print('hello world')`
One of the following language codes is set in lang
.
You can see all the possible codes using the languages
command in the bot.
apl
APLbash
Bashbf
Brainfuckc
Cclj
Clojurecpp
C++cs
C#elixir
Elixirfs
F#go
Gohs
Haskellidr
Idrisjava
Javajs
JavaScriptjulia
Julialisp
Racketlua
Luaocaml
OCamlpas
Pascalphp
PHPpl
Perl5prolog
Prologpy
Pythonrb
Rubyrs
Rust
For every language there is a docker image which spins up a docker container.
The container is used for all evaluations of code, restarting if something goes wrong.
The container is locked down, so there is no networking, limited memory and CPU usage, and a time limit.
- Install Docker 18+
- Install Node 10+
- Install Myriad
- This will require GHC and Cabal.
- You will also have to configure Myriad, see its repository.
- Fill out
config.json
owner
The owner(s) of the bot. Use an array for multiple owners.token
The bot token.prefix
The prefix for commands.codePrefix
The prefix for code evaluation.myriad
The port that Myriad is running on.
- Run
npm i
- Run
myriad --config /path/to/config.dhall --languages /path/to/languages/
- Run
node .