Guest User

Untitled

a guest
Mar 20th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. from TelegramBot import *
  5. import time
  6.  
  7. from alfred_cmd import *
  8.  
  9. API_TOKEN = "YOUR_API_TOKEN"
  10.  
  11. if __name__ == "__main__":
  12.  
  13. bot = TelegramBot(API_TOKEN)
  14. last_msg_id = bot.getMessageID()
  15. while True:
  16. msg_id = bot.getMessageID()
  17. if last_msg_id != msg_id:
  18. last_msg_id = msg_id
  19. msg = bot.getMessage()
  20. commands(bot, msg)
Add Comment
Please, Sign In to add comment