#telegram-bot #personal #token

app perorustbot

My personal telegram bot in rust

3 releases

0.1.2 Jun 16, 2021
0.1.1 Jun 12, 2021
0.1.0 Jun 12, 2021

#71 in #telegram-bot

Download history 25/week @ 2024-02-21 33/week @ 2024-02-28

58 downloads per month

MIT license

15KB
262 lines

perorustbot v0.1.2-dev

Description

My personal telegram bot in rust

Setting up your environment

  1. Download Rust.
  2. Create a new bot using @Botfather to get a token in the format 123456789:blablabla.
  3. Initialise the TELOXIDE_TOKEN environmental variable to your token:
# Unix-like
$ export TELOXIDE_TOKEN=<Your token here>

# Windows
$ set TELOXIDE_TOKEN=<Your token here>
  1. Make sure that your Rust compiler is up to date:
# If you're using stable
$ rustup update stable
$ rustup override set stable

# If you're using nightly
$ rustup update nightly
$ rustup override set nightly

Installation

  1. Build manually (recommended)
$ git clone https://github.com/PeroSar/perorustbot
$ cd perorustbot
$ # edit src/plugins/sudo.rs and replace my telegram id with yours
$ cargo run --release
  1. from crates.io
$ cargo install perorustbot
$ # make sure you have ~/.cargo/bin/ in your PATH
$ perorustbot

list of commands

  • say
  • start
  • help (list of all commands)
  • ping
  • ipi (soon)
  • follow (soon)
  • cs (corona stats)
  • ani (anime info)
  • ctid (chat id, your id, replied users id)
  • udi (urban dict)
  • upload

This bot can be found at https://t.me/Pero_Rust_Bot

Dependencies

~12–26MB
~398K SLoC