Spoilers, major command system improvements #4

Merged
profitroll merged 27 commits from dev into master 2023-01-05 13:45:15 +02:00
Showing only changes of commit 9431763e6b - Show all commits

View File

@ -4,7 +4,7 @@ usage in context of Holo Users."""
from os import path from os import path
from app import isAnAdmin from app import isAnAdmin
from modules.utils import configGet, jsonLoad from modules.utils import configGet, jsonLoad
from modules.database import col_applications from modules.database import col_applications, col_tmp
from pyrogram import filters from pyrogram import filters
from pyrogram.types import Message from pyrogram.types import Message
@ -35,6 +35,9 @@ async def enabled_invites_check_func(_, __, msg: Message):
async def enabled_dinovoice_func(_, __, msg: Message): async def enabled_dinovoice_func(_, __, msg: Message):
return configGet("enabled", "features", "dinovoice") return configGet("enabled", "features", "dinovoice")
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
admin = filters.create(admin_func) admin = filters.create(admin_func)
member = filters.create(member_func) member = filters.create(member_func)
allowed = filters.create(allowed_func) allowed = filters.create(allowed_func)
@ -44,4 +47,6 @@ enabled_applications = filters.create(enabled_applications_func)
enabled_sponsorships = filters.create(enabled_sponsorships_func) enabled_sponsorships = filters.create(enabled_sponsorships_func)
enabled_warnings = filters.create(enabled_warnings_func) enabled_warnings = filters.create(enabled_warnings_func)
enabled_invites_check = filters.create(enabled_invites_check_func) enabled_invites_check = filters.create(enabled_invites_check_func)
enabled_dinovoice = filters.create(enabled_dinovoice_func) enabled_dinovoice = filters.create(enabled_dinovoice_func)
filling_sponsorship = filters.create(filling_sponsorship_func)