Skip to content

TheAwiteb/rpg_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

87 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RPG_BOT (Rust Playground Bot)

Telegram bot help you to run Rust code in Telegram via Rust playground

Languages we support it
( AR πŸ‡ΈπŸ‡¦ - EN πŸ‡ΊπŸ‡Έ - RU πŸ‡·πŸ‡Ί )
Add New Language

License Rust
Rust report
version issues-open issues-closed
Table of Contents
  1. Requirements
  2. Bot interface
  3. Features
  4. Installation
  5. Add new language
  6. Images
  7. License

Requirements

Bot interface

The bot supports 3 straightforward commands:

  • /start - Introductory message to the bot.

  • /help <command (default: all)> β€” Help message for all or specified command.

  • /run <version (default: stable)> <mode (default: debug)> <edition (default: 2021)> β€” Use this command with reply to code you want to execute it.

  • /share <version (default: stable)> <mode (default: debug)> <edition (default: 2021)> β€” Use this command with reply to code you want to share it.

  • /language - Show a keyboard with languages that can be changed to.

  • /info - Show your information.

Features

  • Use ORM database with Diesel.
  • Delay for each user.
  • Beautiful telegram keyboard.
  • Conditions that protect Rust Playground, including the inability to publish sources that are not in the Rust language, and also the inability to publish a source that was published in the same process (and with run as well).
  • Delete the sources periodically (to prevent accumulation and increase in size).
  • Languages support (You can add new language).

Installation

Building

You must put the bot token in the environment file before building for it to be included

With Docker

git clone https://github.com/TheAwiteb/rpg_bot
cd rpg_bot
sudo docker build . -t rpg_bot

With Cargo

git clone https://github.com/TheAwiteb/rpg_bot
cd rpg_bot
diesel migration run
cargo build --release

Running

With Docker

sudo docker run -ti --rm rpg_bot 

With Cargo

cargo run --release

Add new language

To add a new language, it is very simple, just add a file with type json in the folder i18n that contains the sentences in the rest of the files and then do PR (preferably add the name of the new language in the README.md and also in the languages_ctx function, but don't worry, if you don't do this, we will do it)

Images

Help Message

help_message

Run Command

run_command

Share Command

share_command

Languages

language_command

License

The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.

About

Telegram bot πŸ€–, help you to run and share Rust code in Telegram via Rust playground πŸ¦€

Topics

Resources

License

Stars

Watchers

Forks

Languages