diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index e8fcd63..276487a 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -101,7 +101,10 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): bot.get_file(p[-1]).download(out=io) im = Image.open(io) i.image_hash = imagehash.phash(im) - duplicate = self.queued_items.filter(image_hash=i.image_hash, type='photo').first() + 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: m = update.message.reply_photo(json.loads(duplicate.args)[0], f'Duplicate from {duplicate.datetime}', quote=True)