From 9ecd8810ce179bd9f866500874716d7c7d374278 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Sun, 25 Dec 2022 17:24:26 +0300 Subject: [PATCH] reply with duplicate to rpc call #2 --- 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 aa351a2..6da7812 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: - raise RuntimeError('Duplicate') + return 'duplicate' width, height = im.size if width > 2000 or height > 2000: