From 4c7923dd4455c28e8a640e91fff2c0805f6d7f30 Mon Sep 17 00:00:00 2001 From: Dan Elkouby Date: Sun, 8 Apr 2018 15:43:51 +0300 Subject: [PATCH] Cache own user object --- uniborg/telethon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uniborg/telethon.py b/uniborg/telethon.py index 9c8a88c..672cbfb 100644 --- a/uniborg/telethon.py +++ b/uniborg/telethon.py @@ -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()