A Telegram bot written in Rust.

Overview

Knight-Bot

Table of Contents

https://github.com/cyberknight777/knight-bot/actions/workflows/rust.yml/badge.svg?branch=master

About

Knight-Bot is a telegram bot written in rust based on gramme.rs framework.

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. Setup an X server and install CutyCapt

Build manually

$ git clone https://github.com/cyberknight777/knight-bot
$ cd knight-bot
$ mv example-config.toml config.toml
$ # Edit config.toml to include your api id and hash grabbed from my.telegram.org and your bot token.
$ cargo run --release

Commands available currently

  • /aur [package] - Gets package information from AUR.
  • /cat [http code] - Sends cat pic according to http codes.
  • /dog [http code] - Sends dog pic according to http codes.
  • /eightball - Rolls an eightball to say yes/no.
  • /flipcoin - Flips a coin to say heads/tails.
  • /help - List of all supported commands.
  • /ipa [ip] - Get ip information from ipinfo.io
  • /link [url] - Get last redirected URL
  • /l - To say your lucky number.
  • /magisk [stable/beta/canary] - Gets download link of latest Magisk variant according to variant.
  • /man [command] - Gets information of a command from manpages.
  • /msg [text] - Bot replies with your text.
  • /neo - Sends neofetch output.
  • /ping - Checks how fast I can respond.
  • /plant [http code] - Sends plant pic according to http codes.
  • /run - Runnns :).
  • /start - Redirect to /help.
  • /uid - Get current chat’s ID, your ID, replied users ID (if any).
  • /urb [term] - Get definition of a term from urban dictionary.
  • /webshot [website] - Takes a webshot and sends it to the chat.
  • /whois [site] - Gets WHOIS information of a site.

Commands on TODO list

  • k.ul [file] - Upload a file.
  • k.sh [command] - Execute a shell command.
  • k.dl [link] - Download a file.
  • /paste - Paste text in reply to rustbin.
  • /anyone - Sends a why do you ask text.
  • /rtfm - Sends a RTFM text.
  • /qrd - Decodes a QR Code.
  • /qrg [text] - Generates a QR Code.

Find this bot

You can find this bot here

Comments
  • build(deps): bump grammers-session from `32d58d2` to `ec21116`

    build(deps): bump grammers-session from `32d58d2` to `ec21116`

    Bumps grammers-session from 32d58d2 to ec21116.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • build(deps): bump grammers-session from `ec21116` to `7f267c1`

    build(deps): bump grammers-session from `ec21116` to `7f267c1`

    Bumps grammers-session from ec21116 to 7f267c1.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump grammers-client from `ec21116` to `7f267c1`

    build(deps): bump grammers-client from `ec21116` to `7f267c1`

    Bumps grammers-client from ec21116 to 7f267c1.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump grammers-client from `32d58d2` to `ec21116`

    build(deps): bump grammers-client from `32d58d2` to `ec21116`

    Bumps grammers-client from 32d58d2 to ec21116.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump reqwest from 0.11.16 to 0.11.17

    build(deps): bump reqwest from 0.11.16 to 0.11.17

    Bumps reqwest from 0.11.16 to 0.11.17.

    Release notes

    Sourced from reqwest's releases.

    v0.11.17

    What's Changed

    • Upgrade internal dependencies of Experimental HTTP/3 to use quinn v0.9
    • (wasm) Fix blob url support

    New Contributors

    Changelog

    Sourced from reqwest's changelog.

    v0.11.17

    • Upgrade internal dependencies of Experimental HTTP/3 to use quinn v0.9
    • (wasm) Fix blob url support
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump tokio from 1.27.0 to 1.28.0

    build(deps): bump tokio from 1.27.0 to 1.28.0

    Bumps tokio from 1.27.0 to 1.28.0.

    Release notes

    Sourced from tokio's releases.

    Tokio v1.28.0

    1.28.0 (April 25th, 2023)

    Added

    • io: add AsyncFd::async_io (#5542)
    • io: impl BufMut for ReadBuf (#5590)
    • net: add recv_buf for UdpSocket and UnixDatagram (#5583)
    • sync: add OwnedSemaphorePermit::semaphore (#5618)
    • sync: add same_channel to broadcast channel (#5607)
    • sync: add watch::Receiver::wait_for (#5611)
    • task: add JoinSet::spawn_blocking and JoinSet::spawn_blocking_on (#5612)

    Changed

    • deps: update windows-sys to 0.48 (#5591)
    • io: make read_to_end not grow unnecessarily (#5610)
    • macros: make entrypoints more efficient (#5621)
    • sync: improve Debug impl for RwLock (#5647)
    • sync: reduce contention in Notify (#5503)

    Fixed

    • net: support get_peer_cred on AIX (#5065)
    • sync: avoid deadlocks in broadcast with custom wakers (#5578)

    Documented

    • sync: fix typo in Semaphore::MAX_PERMITS (#5645)
    • sync: fix typo in tokio::sync::watch::Sender docs (#5587)

    #5065: tokio-rs/tokio#5065 #5503: tokio-rs/tokio#5503 #5542: tokio-rs/tokio#5542 #5578: tokio-rs/tokio#5578 #5583: tokio-rs/tokio#5583 #5587: tokio-rs/tokio#5587 #5590: tokio-rs/tokio#5590 #5591: tokio-rs/tokio#5591 #5607: tokio-rs/tokio#5607 #5610: tokio-rs/tokio#5610 #5611: tokio-rs/tokio#5611 #5612: tokio-rs/tokio#5612 #5618: tokio-rs/tokio#5618 #5621: tokio-rs/tokio#5621 #5645: tokio-rs/tokio#5645 #5647: tokio-rs/tokio#5647

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump toml from 0.5.11 to 0.7.3

    build(deps): bump toml from 0.5.11 to 0.7.3

    Bumps toml from 0.5.11 to 0.7.3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump grammers-session from `7f267c1` to `461ee71`

    build(deps): bump grammers-session from `7f267c1` to `461ee71`

    Bumps grammers-session from 7f267c1 to 461ee71.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump serde from 1.0.160 to 1.0.162

    build(deps): bump serde from 1.0.160 to 1.0.162

    Bumps serde from 1.0.160 to 1.0.162.

    Release notes

    Sourced from serde's releases.

    1.0.162

    • Support deserializing flattened adjacently tagged enums from data formats which represent fields as bytes, such as the csv crate (#2377, thanks @​mfro)

      #[derive(Deserialize)]
      pub struct Record {
          common: u64,
          #[serde(flatten)]
          kind: Kind,
      }
      

      #[derive(Deserialize)] #[serde(tag = "kind", content = "parameter", rename_all = "lowercase")] enum Kind { Foo(u64), Bar(bool), }

      common,kind,parameter
      1,foo,42
      2,bar,true
      

    v1.0.161

    • Improve error messages produced by serde_test on test failure (#2435, thanks @​Mingun)
    Commits
    • 99f165b Release 1.0.162
    • 2fb5560 Attempt to generate just one copy of TagContentOtherFieldVisitor's field matc...
    • bd653ab Format PR 2377 with rustfmt
    • b5d68ae Merge pull request #2377 from mfro/master
    • 624879c Merge pull request #2441 from dtolnay/test
    • bd9e9ab Reimplement tests that touched serde_test internal API
    • 3e4a23c Release 1.0.161
    • 6326cee Don't panic in serde_test on running out of tokens
    • 8f4d37c Convert serde_test's assert_next_token from macro to function
    • 1b8290b Convert serde_test's unexpected from macro to function
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump grammers-client from `7f267c1` to `461ee71`

    build(deps): bump grammers-client from `7f267c1` to `461ee71`

    Bumps grammers-client from 7f267c1 to 461ee71.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Owner
cyberknight777
Your friendly neighbourhood kernel developer
cyberknight777
Autogenerated wrapper for the Telegram Bot API written in Rust.

An Elegant Rust Client for Telegram Bot API crates.io • docs.rs Table of contents Introduction Key Features Installation Getting Started Documentation

FerrisGram 22 Oct 29, 2022
A simple Telegram bot that eats anonymous channel messages, written in Rust.

tgbot-nochanmsg By Asuna Right Control When creating your bot from botfather, it's not bad to disable privacy mode, because it needs to access the mes

h3a.moe 2 Aug 5, 2022
A Telegram bot written in Rust.

Knight-Bot Table of Contents About Support chat Installation Setting up your environment Build manually Commands Commands on TODO list Find this bot A

cyberknight777 25 Apr 27, 2023
A Simple, But amazing telegram bot, Made using the Rust language!

Telegram bot in Rust A fun Telegram bot made using Rust language.

Deep Alchemy 2 Dec 21, 2021
This is a Telegram bot I'm working on in my free time to learn Rust.

Maldness Bot This is a Telegram bot I'm working on in my free time to learn Rust. Building docker build -t . should be enough.

Sergey Kislyakov 10 May 13, 2022
Rust telegram bot library for many runtimes

Telbot Telbot provides telegram bot types and api wrappers. Specifically, telbot now supports: telbot-types: basic telegram types / requests / respons

kiwiyou 17 Dec 3, 2022
Telegram bot for searching in Arch User Repository ( AUR ); Implemented using rust.

AurSearchBot A Telegram Inline Search Bot Written in Rust Introduction Telegram Bot that can search AUR ( Arch User Repository ) in inline mode. This

AlenPaulVarghese 3 Feb 15, 2022
This is a simple Telegram bot with interface to Firefly III to process and store simple transactions.

Firefly Telegram Bot Fireflies are free, so beautiful. (Les lucioles sont libres, donc belles.) ― Charles de Leusse, Les Contes de la nuit This is a s

null 13 Dec 14, 2022
Telegram Bot Template with Cloudflare Workers

cf-workers-telegram-bot-template Usage This template starts you off with a src/lib.rs file, acting as an entrypoint for requests hitting your Worker.

Lee Taehoon 2 Sep 23, 2021
Telegram bot that zhuzh Twitter content

@twt_2_tg_bot Telegram bot that zhuzh shared Twitter content Text converter Some tweets may contain line breaks or even dialogs. Such tweets are barel

Vladimir 6 Nov 6, 2022
Uradhura is a telegram bot that fetches information and media from reddit

Pathetic little Telegram bot that fetches information from Reddit posts(with gif, image(post with single image) and video)

The Penguins Org 3 May 28, 2022
A Telegram bot to watch animes

AmimeWatch A Telegram bot to watch animes. Re-written version of AmimeWatch in Rust. Preparing Configuration Create a file named config.toml and fill

Andriel Ferreira 7 Jun 1, 2022
An out-of-box ChatGPT bot for Telegram.

TeleGPT API Docs | Releases | Twitter An out-of-box ChatGPT bot for Telegram. TeleGPT is a Telegram bot based on teloxide framework and async_openai.

null 169 Apr 7, 2023
An out-of-box ChatGPT bot for Telegram.

TeleGPT API Docs | Releases | Twitter An out-of-box ChatGPT bot for Telegram. TeleGPT is a Telegram bot based on teloxide framework and async_openai.

null 173 Apr 16, 2023
A Telegram ChatGPT bot

A customizable Telegram bot with a ChatGPT (or GPT4, bring your own API key) backend. You can configure the bot’s context and prompt in template settings.

Chase Zhang 18 Nov 25, 2023
A simple telegram bot to get the tunnel info from ngrok.

Telegram Ngrok Bot A simple bot to fetch the running tunnels from ngrok api. Prerequisits Ngrok agent should be running. Configuration Ngrok config ve

Ishan Dongol 8 Feb 22, 2024
Matrix bot inspired by Shirt Bot.

matrix-openai-bot Matrix bot inspired by Shirt Bot. Usage Run the bot after building it or grabbing the latest release $ matrix-openai-bot Edit the ge

null 5 Oct 26, 2021
Rewrite of the Discord Bot used for Managing the Infinity Bot List Servers.

Arcadia Rewrite of the Discord Bot used for Managing the Infinity Bot List Servers. Contributing Always run fmt.sh before making a Pull Request! MacOS

InfinityBotList 3 Dec 15, 2022
A simple twitter -> telegram forwarder written in Rust.

twitter-telegram-forwarder A simple twitter -> telegram forwarder written in Rust. Example channel: https://t.me/nanabunnonijyuuni_tweet How to use it

Tommy Chiang 2 Dec 27, 2021