Skip to content

htmlhero/tg-anon-bot

Repository files navigation

Telegram anonymity bot

A Telegram bot for full-fledged anonymous communication. You can get maximum information while remaining anonymous.

Workflow

After launch, the bot will wait for messages from users. When a user sends their first message to the bot, their information (ID, name, username, etc.) will be saved. The user can send messages, photos, videos, voice messages, audio, documents, animations and stickers. The administrator can currently only respond with messages.

The bot has an automatic user blocking mechanism called deactivation. By default, when the number of messages from a user exceeds 50 (the default value), the bot will be deactivated. To prevent this, the administrator can activate the user in advance. Activation and deactivation can also be performed later at any time.

First launch

  1. Clone the repository.
  2. Install Node.js and NPM of the versions specified in the project root in the package.json file in the engines section.
  3. Install NPM dependencies by running npm install in the console.
  4. Rename the .env.example file to .env.
  5. Fill in the BOT_TOKEN field in the .env file. To do this, you need to create a bot. You can do this through @BotFather. He will also tell you its token.
  6. Fill in the ADMIN_ID field in the .env file. To do this, you'll need to know the UserID of the future bot administrator. One of the safest ways to detect it is to use the desktop version of Telegram. Open Settings -> Advanced -> Experimental settings -> Show Peer IDs in Profile. Then open the profile of the desired user.
  7. Run the bot by running npm start in the console.

Settings

These environment variables can be changed in the .env file.

  • BOT_TOKEN — Telegram bot token from @BotFather.
  • ADMIN_ID — Telegram UserID of the bot administrator.
  • MAX_MESSAGE_COUNT — The maximum number of messages after which the user will be automatically deactivated.
  • UPDATE_CACHE_DELAY — The time in milliseconds after which user information is saved to the hard drive.

Commands

Commands are only available to the bot administrator. To invoke them, you need to know the UserID of the person you're chatting with.

Command Description Example
/activate <UserID> Activate user /activate 123456789
/deactivate <UserID> Deactivate user /deactivate 123456789
/<UserID> <Message> Send a message to the user /123456789 Hello, world!

License

Project licensed under MIT licence. Please read LICENSE file.

About

A Telegram bot for full-fledged anonymous communication

Topics

Resources

License

Stars

Watchers

Forks

Contributors