Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from TelegramBot import *
- import time
- from alfred_cmd import *
- API_TOKEN = "YOUR_API_TOKEN"
- if __name__ == "__main__":
- bot = TelegramBot(API_TOKEN)
- last_msg_id = bot.getMessageID()
- while True:
- msg_id = bot.getMessageID()
- if last_msg_id != msg_id:
- last_msg_id = msg_id
- msg = bot.getMessage()
- commands(bot, msg)
Add Comment
Please, Sign In to add comment