allow force image send

This commit is contained in:
bakatrouble 2023-11-29 18:24:41 +03:00
parent 5bfc531b39
commit b04dfeda4c

View File

@ -101,6 +101,9 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig):
bot.get_file(p[-1]).download(out=io)
im = Image.open(io)
i.image_hash = imagehash.phash(im)
if m.caption and 'force' in m.caption:
duplicate = None
else:
duplicate = self.queued_items.filter(image_hash=i.image_hash, type='photo').first()
if duplicate:
try: