Skip to content

Telegram bot to forward messages pseudonymously to a group

License

Notifications You must be signed in to change notification settings

sparrowwallet/parrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parrot

Telegram bot to forward messages pseudonymously to a group. Parrot ensures that replies are correctly threaded so a user can converse entirely using the bot. A welcome message is displayed, and a cooldown period can be added to prevent new users from messaging the group for a configurable period.

Building

Build Parrot with

./gradlew clean bootJar

Running

First set enviroment variables:

PARROT_BOT_TOKEN=XXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PARROT_BOT_USERNAME=@BotName
PARROT_GROUP_ID=-XXXXXXXXX

Optionally, add another environmental variable to set a cooldown period for new users joining the group:

PARROT_COOLDOWN_PERIOD_MINUTES=10

Then run with

java -jar build/libs/parrot-1.0.jar

Configuration

You will need to add the bot to the Telegram group, and make it an admin of the group to ensure it has the necessary permissions to forward messages. You will need to give it the Delete Messages permission to delete messages from banned users. If you are using the cooldown period feature, the bot will also need the Ban Users permission, and the Manage Video Chats.

Usage

The bot should just work, forwarding messages back and forth, displaying the welcome message, and restricting users during the cooldown period if configured. The bot currently implements rate limiting, allowing 5 messages every minute.

Admins of the group can also ban and unban users. Banning users will also delete all messages from them forwarded from the bot to the group. To ban a user, in the bot use the command /ban #NymName. To unban a user, use /unban #NymName.

About

Telegram bot to forward messages pseudonymously to a group

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages