User bans, emoji and other bug fixes, age limiter, etc #26

Merged
profitroll merged 31 commits from dev into master 2023-01-31 15:26:56 +02:00
Showing only changes of commit ee738d00b5 - Show all commits

View File

@ -6,7 +6,7 @@ from classes.errors.holo_user import UserNotFoundError, UserInvalidError
from classes.holo_user import HoloUser from classes.holo_user import HoloUser
from modules.logging import logWrite from modules.logging import logWrite
from modules.utils import locale from modules.utils import locale
from modules.database import col_spoilers from modules.database import col_spoilers, col_applications
from modules import custom_filters from modules import custom_filters
# Spoiler command ============================================================================================================== # Spoiler command ==============================================================================================================
@ -18,18 +18,18 @@ async def cmd_spoiler(app: Client, msg: Message):
except (UserInvalidError, UserNotFoundError): except (UserInvalidError, UserNotFoundError):
return return
if holo_user.application_state()[0] != "approved": if col_applications.find_one( {"user": holo_user.id} ) is None:
await msg.reply_text(locale("not_member", "message", locale=msg.from_user)) await msg.reply_text(locale("not_member", "message", locale=msg.from_user))
return return
if holo_user.application_state()[0] != "fill" and holo_user.sponsorship_state()[0] != "fill": if holo_user.application_state()[0] != "fill" and holo_user.sponsorship_state()[0] != "fill":
if col_spoilers.find_one( {"user": msg.from_user.id, "completed": False} ) is None: if col_spoilers.find_one( {"user": holo_user.id, "completed": False} ) is None:
col_spoilers.insert_one( col_spoilers.insert_one(
{ {
"user": msg.from_user.id, "user": holo_user.id,
"completed": False, "completed": False,
"category": None, "category": None,
"description": None, "description": None,