Advertisement
emodev

Untitled

Jan 23rd, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.16 KB | None | 0 0
  1. from telegram.ext import Updater, CommandHandler
  2. import telegram
  3. from telegram.ext import MessageHandler, Filters
  4. from telegram.ext import CommandHandler
  5.  
  6. # Replace this with your Telegram Bot Token
  7. TOKEN = '609519037:AAGbPiLeQWYM8i0d6H-G_ylA_O3bNe71UNw'
  8. updater = Updater(token=TOKEN)
  9.  
  10. dispatcher = updater.dispatcher
  11.  
  12. bot = telegram.Bot(token=TOKEN)
  13. # bot.send_message(chat_id=368080575, text="I'm sorry Dave I'm afraid I can't do that.")
  14.  
  15. messa = "https://youtu.be/KXanlLjOFh0"
  16.  
  17.  
  18. def start(bot, update):
  19.     bot.send_message(chat_id=update.message.chat_id, text="I'm a bot, talk to me.... Helloooooo, are you there??\n" + messa)
  20.  
  21.  
  22. def list(bot,update):
  23.     bot.send_message(chat_id=update.message.chat_id, text="Left or right arm??")
  24.  
  25.  
  26.  
  27. def setaa(bot,update):
  28.     bot.send_message(chat_id=update.message.chat_id, text="Setaa mi e bate - az sam robot")
  29.  
  30.  
  31. start_handler = CommandHandler('start', start)
  32. ebavka_handler = CommandHandler('gatanka', list)
  33. setaa_handler = CommandHandler('setaa', setaa)
  34. dispatcher.add_handler(start_handler)
  35. dispatcher.add_handler(ebavka_handler)
  36. dispatcher.add_handler(setaa_handler)
  37.  
  38. updater.start_polling()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement