A Telegram bot that validates new users that enter to the (super)group with a simple math question.
Bot written fully in Rust 🦀.
- Clone the bot and build it using
cargo build --release
. - Before running the bot, set the
bot_token
in theConfig.toml
file or use theTGCAPTCHA_BOT_TOKEN
environment value. - 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. - 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. - Add the bot to any desired group, ensuring it has administrator privileges.
- 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.
/help
: show commands help message.
/status
: check the bot status, can be used to make sure that the bot is up and running.
/sourcecode
: share a link to the source code of the bot.