Last active
May 19, 2017 15:21
-
-
Save Kylmakalle/0de6a10a2b12abc994bfd49ef38fff90 to your computer and use it in GitHub Desktop.
Testing send_video_note method in pyTelegramBotAPI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import telebot | |
token = '123456789:AAAbbbCccDDDEEEffFGGgHHhIIijjJ12345' | |
bot = telebot.TeleBot(token) | |
@bot.channel_post_handler(content_types=['video_note']) | |
def converting(message): | |
bot.get_file(message.video_note.file_id) | |
videonote = bot.download_file(bot.get_file(message.video_note.file_id).file_path) | |
bot.send_message('@videonote', | |
'[Video modified by bot](https://gist.github.com/Kylmakalle/0de6a10a2b12abc994bfd49ef38fff90)\n', | |
parse_mode='Markdown', disable_web_page_preview=True) | |
bot.send_video_note('@videonote', videonote, length=15, duration=3) | |
bot.polling(none_stop=True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment