Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from telegram.ext import Updater, CommandHandler
- import logging
- logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
- botToken = '542103062:AAGB1_w0PzoUxV-CEbuW1-LNa7xh0MuNGVo'
- chat_id = '-265229937'
- updater = Updater(token=botToken)
- dispatcher = updater.dispatcher
- def start(bot, updater):
- bot.sendMessage(chat_id=chat_id, text='CHALLO BLYAT!!')
- def noice_gif(bot, update):
- # bot.sendDocument(chat_id=chat_id, document=open('/Users/mhuellmann/Downloads/click_noice.gif'))
- bot.sendDocument(chat_id=chat_id, document='https://media.giphy.com/media/8vXgoDptHLniyP2RVQ/giphy.gif')
- def noice_voice(bot, update):
- bot.send_voice(chat_id=chat_id, voice=open('noice.mp3', 'rb'))
- def noice(bot, update):
- bot.sendPhoto(chat_id=chat_id, photo='https://i.ytimg.com/vi/MYuq7Xc5A4E/maxresdefault.jpg')
- start_handler = CommandHandler('start', start)
- noice_gif_handler = CommandHandler('noicegif', noice_gif)
- voice_handler = CommandHandler('voice', noice_voice)
- noice_handler = CommandHandler('noice', noice)
- dispatcher.add_handler(start_handler)
- dispatcher.add_handler(noice_gif_handler)
- dispatcher.add_handler(voice_handler)
- dispatcher.add_handler(noice_handler)
- updater.start_polling()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement