add post_gif to rpc dispatcher
This commit is contained in:
parent
5d69af14d5
commit
ae446c01bb
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user