A simple Telegram bot that eats anonymous channel messages, written in Rust.

Overview

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 messages to detect channel messages.

This bot needs the admin right "Delele messages" to be fully functional. If not granted, an error message will pop out in the chat.

Compile

$ cargo build --release 

Remember to move the target build to your desired path, like /usr/bin .

Usage

Very simple.

To use this bot, please set your environment variable first.

$ export TELOXIDE_TOKEN="your bot token here"

Then execute it.

Or just execute it like this:

$ TELOXIDE_TOKEN="your bot token here" /usr/bin/tgbot-nochanmsg

Caution! This will expose your bot token to your shell history.

Don't forget to clean up.

Run as a Service

Here is a typical template.

Similarly, the bot token is set as an environment variable in the file. So, keep it safe.

# /etc/systmd/system/tgbot-nochanmsg.service

[Unit]
Description=tgbot-nochanmsg
Wants=network.target
After=network.target

[Service]
Type=simple
Restart=on-failure
RestartSec=10s
Environment="RUST_LOG=debug"
Environment="TELOXIDE_TOKEN=<Your_Token_here>"
ExecStart=/usr/bin/tgbot-nochanmsg

[Install]
WantedBy=multi-user.target
You might also like...
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.

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

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

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.

Telegram bot that zhuzh Twitter content
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

Uradhura is a telegram bot that fetches information and media from reddit
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)

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

An out-of-box ChatGPT bot for Telegram.
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.

An out-of-box ChatGPT bot for Telegram.
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.

Owner
h3a.moe
h3a.moe
Telegram bot to fetch images from Terceira Ponte and Rodosol into your Telegram chat.

rodosol-telegram-bot Add this bot to your contacts list This bot is a quick scraper that gets the pictures from the rodosol "De olho na via" feature a

Armando Magalhães 1 Jan 9, 2022
The language that eats the stack. Heavily inspired by porth which is inspired off of forth

Snack The language that eats the stack. Heavily inspired by porth which is inspired off of forth Install To use Snack you will need Rust and fasm Afte

Cowboy8625 2 Mar 20, 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
Expand threaded messages without "Also sent to the channel"

slack-thread-expander Expand threaded messages without "Also sent to the channel" Usage Setup Slack App Create a Slack App for slack-thread-expander.

Kohei Suzuki 7 Feb 15, 2022
Source code for the Telegram channel @pixiv_daily

PixivDaily (Rust) This repository contains the source code of the program running the Telegram channel @pixiv_daily. Usage First, you'll need to clone

K4YT3X 5 Jun 23, 2022
Small Rust program for sending messages to Telegram channels.

tg-send: a small Rust program for sending Telegram messages Send messages to a group/channel via the Bot API from the command line; it's super simple

null 2 Jul 10, 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
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
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 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