Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. def main():
  2.     updater = Updater(TOKEN,use_context=True)
  3.     ds = updater.dispatcher
  4.     m = MessageHandler(Filters.regex('^(1|2|3)$'),mhand)
  5.     c = CommandHandler("good",gooder)
  6.     ds.add_handler(c)
  7.     ds.add_handler(m)
  8.     updater.start_polling()
  9.     updater.idle()
  10.  
  11. def gooder(update,context):
  12.     update.message.reply_text("hello")
  13.  
  14. def mhand(update,context):
  15.     update.message.reply_text("yes u did it")
  16.     print(update.effective_chat.id)
  17.     print("passed  id")
  18.  
  19. if __name__ == "__main__":
  20.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement