mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-14 19:48:57 +01:00
Add sticker as an inputfile
This commit is contained in:
parent
dc2dfa24ad
commit
dcfe08dbda
1 changed files with 5 additions and 2 deletions
|
@ -55,6 +55,9 @@ class InputFile(object):
|
|||
if 'photo' in data:
|
||||
self.input_name = 'photo'
|
||||
self.input_file = data.pop('photo')
|
||||
if 'sticker' in data:
|
||||
self.input_name = 'sticker'
|
||||
self.input_file = data.pop('sticker')
|
||||
if 'video' in data:
|
||||
self.input_name = 'video'
|
||||
self.input_file = data.pop('video')
|
||||
|
@ -174,8 +177,8 @@ class InputFile(object):
|
|||
bool
|
||||
"""
|
||||
if data:
|
||||
file_types = ['audio', 'document', 'photo', 'video', 'voice',
|
||||
'certificate']
|
||||
file_types = ['audio', 'document', 'photo', 'sticker', 'video',
|
||||
'voice', 'certificate']
|
||||
file_type = [i for i in list(data.keys()) if i in file_types]
|
||||
|
||||
if file_type:
|
||||
|
|
Loading…
Add table
Reference in a new issue