Skip to content

Instantly share code, notes, and snippets.

@Kylmakalle
Last active May 19, 2017 15:21
Show Gist options
  • Save Kylmakalle/0de6a10a2b12abc994bfd49ef38fff90 to your computer and use it in GitHub Desktop.
Save Kylmakalle/0de6a10a2b12abc994bfd49ef38fff90 to your computer and use it in GitHub Desktop.
Testing send_video_note method in pyTelegramBotAPI
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