rda0 / maubot-exec

A maubot plugin to execute code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exec

A maubot that executes code. exec is updated to be compatible with python 3.8+.

Usage

The bot is triggered by a specific message prefix (defaults to !exec) and executes the code in the first code block.

!exec
```python
print("Hello, World!")
```

Standard input can be added with another code block that has stdin as the language:

!exec
```python
print(f"Hello, {input()}")
```

```stdin
maubot
```

When the bot executes the code, it'll reply immediately and then update the output using edits until the command finishes. After it finishes, the reply will be edited to contain the return values.

If running in userbot mode, the bot will edit your original message instead of making a new reply message.

Currently, the bot supports python and shell as languages.

Contributors

Made with contrib.rocks.

About

A maubot plugin to execute code.

License:GNU Affero General Public License v3.0


Languages

Language:Python 99.7%Language:Shell 0.3%