allow force image send
This commit is contained in:
parent
5bfc531b39
commit
b04dfeda4c
@ -101,6 +101,9 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig):
|
|||||||
bot.get_file(p[-1]).download(out=io)
|
bot.get_file(p[-1]).download(out=io)
|
||||||
im = Image.open(io)
|
im = Image.open(io)
|
||||||
i.image_hash = imagehash.phash(im)
|
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()
|
duplicate = self.queued_items.filter(image_hash=i.image_hash, type='photo').first()
|
||||||
if duplicate:
|
if duplicate:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user