From 4d494267cd34caade880ff13c295c150b50f3577 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Sun, 25 Dec 2022 17:23:24 +0300 Subject: [PATCH] reply with duplicate to rpc call --- bots/modules/channel_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index e45dc19..aa351a2 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -50,7 +50,7 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): image_hash = imagehash.phash(im) if self.queued_items.filter(image_hash=image_hash, type='photo').count() > 0: - return False + raise RuntimeError('Duplicate') width, height = im.size if width > 2000 or height > 2000: