19 lines
1.3 KiB
Python
19 lines
1.3 KiB
Python
from app import app
|
|
from pyrogram import filters
|
|
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message
|
|
from pyrogram.client import Client
|
|
from classes.holo_user import HoloUser
|
|
from modules import custom_filters
|
|
from modules.utils import locale, should_quote
|
|
from modules.database import col_applications
|
|
|
|
# Sponsorship command ==========================================================================================================
|
|
@app.on_message(~ filters.scheduled & (custom_filters.allowed | custom_filters.admin) & filters.command(["sponsorship"], prefixes=["/"]))
|
|
async def cmd_sponsorship(app: Client, msg: Message):
|
|
if HoloUser(msg.from_user).application_state()[0] == "fill":
|
|
await msg.reply_text(locale("finish_application", "message"), quote=should_quote(msg))
|
|
return
|
|
await msg.reply_text(locale("sponsorship_apply", "message"), reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text=str(locale("sponsor_apply", "button")), callback_data=f"sponsor_apply_{msg.from_user.id}")]]), quote=should_quote(msg))
|
|
# else:
|
|
# await msg.reply_text(locale("sponsorship_application_empty", "message"))
|
|
# ============================================================================================================================== |