Skip to content

isayakhov/duplicate-stickers-remover-bot

Repository files navigation

Duplicate Stickers Remover Telegram Bot

build codecov code_quality code_score

What is this?

Bot can cache your stickers and then find duplicates in different sticker sets. When duplicates found bot will create new sticker set without duplicates and sends it to you. You will be the owner of all created sticker sets. Bot uses average hash algorithm from this library to find duplicates.

How to run it locally?

  1. First you need to create your own bot in Telegram.
  2. Next you need to pass to environment variables your bot's token into TELEGRAM_TOKEN variable and your bot's name into TELEGRAM_BOT_NAME variable as well.
  3. Run: python -m app.main.
  4. Or build docker image and run it.
  5. That's all :)

How to use it?

To start caching sesstion type /cache and then send stickers from your sticker sets. Bot will cache whole sticker set and send you a message when it finished.

To fihish caching session type /finish.

To start filtering sesstion type /filter and then send stickers from your sticker sets. Bot will find and remove duplicates by early cached stickers from other sticker sets and create new sticker set with filtered stickers with same name. You will be the owner of created sticker sets.

To fihish filtering session type /finish.

How to contribute?

  1. Type: pip install pre-commit && pre-commit install
  2. Make and commit your changes
  3. Push your changes
  4. Open Pull request

Environment variables

Common

Name Required Default Description
STICKERS_ROOT_DIRECTORY - same as app dir Cache root directory
AVERAGE_HASH_THRESHOLD_VALUE 8 Threshold value for average hash

Telegram

Name Required Default Description
TELEGRAM_TOKEN - "FILL_ME" Telegram bot token
TELEGRAM_BOT_NAME - "FILL_ME" Telegram bot name

About

Bot can find and remove duplicates stickers from different sticker sets

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published