This commit is contained in:
2023-03-09 16:25:09 +01:00
5 changed files with 25 additions and 15 deletions

View File

@@ -39,7 +39,7 @@ async def cmd_warnings(app: Client, msg: Message):
if len(list_of_users) != 0:
target = list_of_users[0].user
target_name = target.first_name
target_id = str(target.id)
target_id = target.id
else:
await msg.reply_text(
locale("no_user_warnings", "message", locale=msg.from_user).format(
@@ -48,7 +48,7 @@ async def cmd_warnings(app: Client, msg: Message):
)
return
warns = len(list(col_warnings.find({"user": target_id})))
warns = col_warnings.count_documents({"user": target_id})
if warns == 0:
await msg.reply_text(