Stop creating connections for unauthenticated users at startup
This commit is contained in:
@@ -59,8 +59,8 @@ class Bot(AbstractUser):
|
||||
if isinstance(id, int):
|
||||
self.tg_whitelist.append(id)
|
||||
|
||||
async def start(self):
|
||||
await super().start()
|
||||
async def start(self, delete_unless_authenticated=False):
|
||||
await super().start(delete_unless_authenticated)
|
||||
if not await self.is_logged_in():
|
||||
await self.client.sign_in(bot_token=self.token)
|
||||
await self.post_login()
|
||||
|
||||
Reference in New Issue
Block a user