From ae446c01bb80505c451e5b321ee13d9dd3fdf54c Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Thu, 29 Feb 2024 21:35:52 +0300 Subject: [PATCH] add post_gif to rpc dispatcher --- bots/modules/channel_helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index 347ef60..9b78dee 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -38,6 +38,7 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): super().__init__(*args, **kwargs) self.rpc_dispatcher = RPCDispatcher() self.rpc_dispatcher['post_photo'] = self.rpc_post_photo + self.rpc_dispatcher['post_gif'] = self.rpc_post_gif def rpc_post_photo(self, photo, is_base64=False, note=''): config._reload_maybe() @@ -82,7 +83,7 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): with open(fpath_input, 'wb') as f: f.write(resp.content) except: - raise RuntimeError('Could not load image') + raise RuntimeError('Could not load GIF') video_input = ffmpeg \ .input(fpath_input) cmd = video_input \