Telegram bot to find previous images from a chat
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Syfaro 427135db67 Add README. vor 1 Jahr
.gitignore Fix a bug, improve some code, add .gitignore. vor 1 Jahr
README.md Add README. vor 1 Jahr
bot.go Fix a bug, improve some code, add .gitignore. vor 1 Jahr

README.md

telegram-previous-images

Uses a perceptual image hash to determine if a message has already been sent within a group chat.

Data is stored in Bolt. It records the image hash and the original Message.

Configuration

The following environment variables must be set:

  • TELEGRAM_APITOKEN - Telegram token from Botfather
  • TELEGRAM_DEBUG - If tgbotapi should print debugging messages (true/false)
  • BOLT_DBNAME - Filename for Bolt database file

Usage

After starting, add it to your chat. After setting a threshold to report on by using the command /threshold num where num is the threshold value on a range of 0 being idential to any higher number (15 is a good starting point), it will start indexing photos sent. If a photo matches a previous photo within the threshold, it will reply to the old message with the similarity.

It currently supports loading photos, documents, and URLs that link directly to an image. Hopefully in the future sites will be added to allow it to work somewhat with links that aren’t directly images.