This commit is contained in:
yasirarism 2023-05-29 14:26:23 +00:00 committed by GitHub
parent 3e297573df
commit 5c43e40d8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -314,7 +314,7 @@ async def update_restart(self: Client, ctx: Message, strings) -> "Message":
async def updtebot(client, update, users, chats):
if isinstance(update, UpdateBotStopped):
user = users[update.user_id]
if update.stopped and await db.is_user_exist(user.id)::
if update.stopped and await db.is_user_exist(user.id):
await db.delete_user(user.id)
await client.send_msg(LOG_CHANNEL, f"<a href='tg://user?id={user.id}'>{user.first_name}</a> (<code>{user.id}</code>) " f"{'BLOCKED' if update.stopped else 'UNBLOCKED'} the bot at " f"{datetime.fromtimestamp(update.date)}")