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
3 changed files with 8 additions and 1 deletions
Showing only changes of commit fd5e0b5b22 - Show all commits

View File

@ -10,7 +10,7 @@ from modules.database import col_spoilers
from modules import custom_filters
# Spoiler command ==============================================================================================================
@app.on_message(custom_filters.member & ~filters.scheduled & filters.private & filters.command(["spoiler"], prefixes=["/"]))
@app.on_message(custom_filters.enabled_spoilers & custom_filters.member & ~filters.scheduled & filters.private & filters.command(["spoiler"], prefixes=["/"]))
async def cmd_spoiler(app: Client, msg: Message):
try:

View File

@ -39,6 +39,9 @@ async def enabled_invites_check_func(_, __, msg: Message):
async def enabled_dinovoice_func(_, __, msg: Message):
return configGet("enabled", "features", "dinovoice")
async def enabled_spoilers_func(_, __, msg: Message):
return configGet("enabled", "features", "spoilers")
async def filling_sponsorship_func(_, __, msg: Message):
return True if col_tmp.find_one({"user": msg.from_user.id, "type": "sponsorship"}) is not None else False
@ -52,5 +55,6 @@ enabled_sponsorships = filters.create(enabled_sponsorships_func)
enabled_warnings = filters.create(enabled_warnings_func)
enabled_invites_check = filters.create(enabled_invites_check_func)
enabled_dinovoice = filters.create(enabled_dinovoice_func)
enabled_spoilers = filters.create(enabled_spoilers_func)
filling_sponsorship = filters.create(filling_sponsorship_func)

View File

@ -66,6 +66,9 @@ async def any_stage(app: Client, msg: Message):
if holo_user.application_state()[0] != "fill" and holo_user.sponsorship_state()[0] != "fill":
if configGet("enabled", "features", "spoilers") is False:
return
spoiler = col_spoilers.find_one( {"user": msg.from_user.id, "completed": False} )
if spoiler is None: