update deps, add support for video notes
This commit is contained in:
parent
6a0dc0b00b
commit
ab45dccb01
2 changed files with 18 additions and 8 deletions
|
@ -168,8 +168,11 @@ def handle_rest(bot, update):
|
|||
file = update.message.audio.file_id
|
||||
elif update.message.video is not None:
|
||||
file = update.message.video.file_id
|
||||
elif update.message.video_note is not None:
|
||||
file = update.message.video_note.file_id
|
||||
elif update.message.voice is not None:
|
||||
file = update.message.voice.file_id
|
||||
|
||||
if file is not None:
|
||||
url = bot.getFile(file).file_path
|
||||
handle([url], update.message, download_raw, filename=filename)
|
||||
|
@ -201,7 +204,9 @@ def main():
|
|||
|
||||
dp.add_handler(MessageHandler(Filters.entity(MessageEntity.URL), handle_url))
|
||||
dp.add_handler(
|
||||
MessageHandler(Filters.photo | Filters.video | Filters.audio | Filters.voice | Filters.document, handle_rest))
|
||||
MessageHandler(
|
||||
Filters.photo | Filters.video | Filters.video_note | Filters.audio | Filters.voice | Filters.document,
|
||||
handle_rest))
|
||||
dp.add_handler(MessageHandler(Filters.entity(MessageEntity.HASHTAG), handle_hashtag))
|
||||
|
||||
updater.start_polling()
|
||||
|
|
|
@ -4,12 +4,17 @@
|
|||
#
|
||||
# pip-compile --output-file requirements.txt requirements.in
|
||||
#
|
||||
certifi==2018.1.18 # via python-telegram-bot, requests
|
||||
asn1crypto==0.24.0 # via cryptography
|
||||
certifi==2018.8.24 # via python-telegram-bot, requests
|
||||
cffi==1.11.5 # via cryptography
|
||||
chardet==3.0.4 # via requests
|
||||
filetype==1.0.0
|
||||
cryptography==2.3.1 # via python-telegram-bot
|
||||
filetype==1.0.1
|
||||
future==0.16.0 # via python-telegram-bot
|
||||
idna==2.6 # via requests
|
||||
python-telegram-bot==9.0.0
|
||||
requests==2.18.4
|
||||
urllib3==1.22 # via requests
|
||||
youtube-dl==2018.1.27
|
||||
idna==2.7 # via cryptography, requests
|
||||
pycparser==2.19 # via cffi
|
||||
python-telegram-bot==11.1.0
|
||||
requests==2.19.1
|
||||
six==1.11.0 # via cryptography
|
||||
urllib3==1.23 # via requests
|
||||
youtube-dl==2018.9.26
|
||||
|
|
Loading…
Reference in a new issue