Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dcfe08d

Browse files
committed
Add sticker as an inputfile
1 parent dc2dfa2 commit dcfe08d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

telegram/inputfile.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ def __init__(self,
5555
if 'photo' in data:
5656
self.input_name = 'photo'
5757
self.input_file = data.pop('photo')
58+
if 'sticker' in data:
59+
self.input_name = 'sticker'
60+
self.input_file = data.pop('sticker')
5861
if 'video' in data:
5962
self.input_name = 'video'
6063
self.input_file = data.pop('video')
@@ -174,8 +177,8 @@ def is_inputfile(data):
174177
bool
175178
"""
176179
if data:
177-
file_types = ['audio', 'document', 'photo', 'video', 'voice',
178-
'certificate']
180+
file_types = ['audio', 'document', 'photo', 'sticker', 'video',
181+
'voice', 'certificate']
179182
file_type = [i for i in list(data.keys()) if i in file_types]
180183

181184
if file_type:

0 commit comments

Comments
 (0)