Last active
May 9, 2017 19:45
-
-
Save Kylmakalle/36db855dc7cb5b3df9c8f1d1eebd5122 to your computer and use it in GitHub Desktop.
Sending .ogg file as voice message via https://github.com/eternnoir/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 | |
import wget | |
token = '123456789:AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLL' | |
chatid = 12345678 | |
bot = telebot.TeleBot(token) | |
file = 'http://dictionary.cambridge.org/media/english/uk_pron_ogg/u/ukh/ukhef/ukheft_029.ogg' | |
file = wget.download(file) | |
file = open(file, 'rb') | |
bot.send_voice(chatid, file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment