Skip to content

PeroSar/perorustbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PeroRustBot

Table of Contents

https://img.shields.io/crates/v/perorustbot.svg https://github.com/PeroSar/perorustbot/actions/workflows/rust.yml/badge.svg?branch=dev

About

PeroRustBot is a telegram bot written in rust using teloxide

Support chat

Support chat for this bot can be found here

Installation

Setting up your environment

  1. Download Rust
  2. Create a new bot using @Botfather
  3. Initialise the TELOXIDE_TOKEN environmental variable to your token:
$ export TELOXIDE_TOKEN=<Your token here>

Build manually

$ git clone https://github.com/PeroSar/perorustbot
$ cd perorustbot
$ # edit src/plugins/sudo.rs and replace my telegram id with yours
$ cargo run --release

From crates.io

$ cargo install perorustbot
$ perorustbot

Commands available currently

  • /start - Redirect to /help
  • /help - List of all commands
  • /ping - Replies with “Pong!”
  • /say [text] - Bot replies with your text
  • /ctid - Get current chat’s ID, your ID, replied users ID (if any)
  • /ipi [ip] - Get ip information from ipinfo.io
  • /cs [country] - Get corona stats
  • /udi [term] - Get definition of a term
  • /paste - Paste text in reply to rustbin

Sudo commands

  • p.upload [file] - Upload a file
  • p.sh [command] - Execute a shell command

Find this bot

You can find this bot here