ganesshkumar/git-reminder

View on GitHub
get_user_id.py

Summary

Maintainability
A
0 mins
Test Coverage
import os
from twx.botapi import TelegramBot

bot = TelegramBot(os.environ["BOT_API_TOKEN"])
bot.update_bot_info().wait()

updates = bot.get_updates().wait()
print len(updates)
for update in updates:
    # Bot receives your message in this object. User id can be obtained from this update object.
    print(update)