mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 09:44:50 +00:00
Fix unban user cmd
This commit is contained in:
parent
0ba4e87593
commit
47ce746635
2 changed files with 2 additions and 2 deletions
|
|
@ -51,7 +51,7 @@ class UsersData:
|
|||
|
||||
async def get_ban_status(self, id):
|
||||
user = await self.col.find_one({"_id": int(id)})
|
||||
return (True, user) if user else (False, None)
|
||||
return user if user else False
|
||||
|
||||
async def get_all_users(self):
|
||||
return self.col.find({})
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ async def unban_a_user(bot, message):
|
|||
return await message.reply(f"Error - {e}")
|
||||
else:
|
||||
jar = await db.get_ban_status(k.id)
|
||||
if not jar["is_banned"]:
|
||||
if not jar:
|
||||
return await message.reply(f"{k.mention} is not yet banned.")
|
||||
await db.remove_ban(k.id)
|
||||
await message.reply(f"Successfully unbanned user {k.mention}!!!")
|
||||
|
|
|
|||
Loading…
Reference in a new issue