Cache own user object

This commit is contained in:
Dan Elkouby 2018-04-08 15:43:51 +03:00
parent 3660e22036
commit 4c7923dd44
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ class Uniborg(TelegramClient):
async def _async_init(self):
await self.start()
self.uid = telethon.utils.get_peer_id(await self.get_me())
self.me = await self.get_me()
self.uid = telethon.utils.get_peer_id(self.me)
def run(self):
self._loop.run_forever()