Compare commits

..

4 Commits

Author SHA1 Message Date
e50cdd53b3 Updated dependencies 2023-03-01 19:16:41 +01:00
3012c3d5ae Fixed object type and db lookup 2023-03-01 19:16:34 +01:00
8c21ae1844 Fixed absence of /warnings in config 2023-03-01 19:16:13 +01:00
3df57f1c42 Added one more venv to ignore 2023-03-01 19:15:53 +01:00
4 changed files with 14 additions and 4 deletions

1
.gitignore vendored
View File

@@ -162,5 +162,6 @@ TASK.md
inline_bot.py
.vscode
migrate.py
venv_linux
validation/*
!validation/*.json

View File

@@ -136,6 +136,15 @@
"warnings"
]
},
"warnings": {
"permissions": [
"admins",
"group_admins"
],
"modules": [
"warnings"
]
},
"reapply": {
"permissions": [
"users",

View File

@@ -27,12 +27,12 @@ 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(msg.command[1]))
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(locale("no_warnings", "message", locale=msg.from_user).format(target_name, target_id), quote=should_quote(msg))

View File

@@ -1,8 +1,8 @@
APScheduler==3.9.1.post1
APScheduler==3.10.0
fastapi~=0.88.0
psutil==5.9.4
pymongo==4.3.3
Pyrogram~=2.0.97
Pyrogram~=2.0.100
requests==2.28.2
tgcrypto==1.2.5
python_dateutil==2.8.2