Skip to content

YouKnow-sys/tgcaptcha-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Telegram Captcha Bot

Build Status MIT

A Telegram bot that validates new users that enter to the (super)group with a simple math question.

Bot written fully in Rust 🦀.

How to build and use:

  1. Clone the bot and build it using cargo build --release.
  2. Before running the bot, set bot_token and database_path in the Config.toml file or set TGCAPTCHA_BOT_TOKEN and TGCAPTCHA_DATABASE_PATH environment variables.
  3. Customize the Config.toml file according to your preferences. You can modify various aspects of the bot, such as restricting its functionality to specific groups or setting custom settings and messages for different groups.
  4. Alternatively, you can store all the settings in the environment instead of using Config.toml. We utilize the Config crate for managing our configuration. Refer to its documentation for more details.
  5. Add the bot to any desired group, ensuring it has administrator privileges.
  6. The bot will restrict new users from sending messages in the group until they answer a math question sent by the bot. If it takes too long for the user to respond or choose the wrong answer, they will be banned.

Commands:

  • /help: show commands help message.
  • /status: check the bot status, can be used to make sure that the bot is up and running.
  • /uptime: show the bot uptime.
  • /sourcecode: share a link to the source code of the bot.

About

A simple telegram captcha bot

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages