notify about duplicate

This commit is contained in:
bakatrouble 2022-12-06 15:03:40 +03:00
parent d1fa23e399
commit 2198610bac

View File

@ -100,6 +100,7 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig):
im = Image.open(io)
i.image_hash = imagehash.phash(im)
if self.queued_items.filter(image_hash=i.image_hash, type='photo').count() > 0:
update.message.reply_text('Duplicate')
return
elif hasattr(m, 'sticker') and m.sticker:
s = m.sticker