Skip to content

Mahmud0808/TelegramJoinRequestVerifier

Repository files navigation

Device Verification Bot

A Telegram bot that verifies users based on their device model before allowing them to join a chat group.

Features

  • Asks users what device they are using when they request to join the chat.
  • Approves the join request if the user's response contains the specified keyword.
  • Rejects the join request otherwise.

Prerequisites

  • Java Development Kit (JDK) 17 or higher
  • Gradle build tool
  • A Telegram bot token from @BotFather

Getting Started

Clone the Repository

Clone this repository with the following command:

git clone https://github.com/Mahmud0808/TelegramJoinRequestVerifier.git
cd TelegramJoinRequestVerifier

Build the Project

This project includes a GitHub Actions workflow for continuous integration. The workflow will build the project whenever code is pushed to the main branch or a pull request is made to the main branch.

If you want to build locally, ensure you have Gradle installed and build the project with the following command:

./gradlew clean shadowJar

The compiled JAR file can be found in the /build/libs directory.

Running the Bot

You can run the bot locally using:

java -jar joinreqbot.jar --token YOUR_BOT_TOKEN --keyword KEYWORD_TO_ACCEPT --log LOG_CHANNEL_ID (optional)

Replace YOUR_BOT_TOKEN with the actual token provided by BotFather.

Usage

Enable Approve new members from your telegram group settings. Add the bot you created using BotFather as an admin. When a user requests to join the chat, the bot will send them a message asking about their device. If the user mentions specified keyword in their response, they will be approved to join the chat. Otherwise, their join request will be declined.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any bugs or enhancements.

Acknowledgments

About

A telegram bot to handle group join requests.

Topics

Resources

Stars

Watchers

Forks

Contributors 5

Languages