2022-12-27 19:46:17 +02:00
|
|
|
from app import app
|
2022-12-10 11:42:56 +02:00
|
|
|
from pyrogram import filters
|
2022-12-27 14:36:54 +02:00
|
|
|
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message
|
|
|
|
from pyrogram.client import Client
|
2022-12-27 14:23:24 +02:00
|
|
|
from classes.holo_user import HoloUser
|
2022-12-27 19:46:17 +02:00
|
|
|
from modules import custom_filters
|
2022-12-21 13:25:47 +02:00
|
|
|
from modules.utils import locale, should_quote
|
2022-12-15 16:12:52 +02:00
|
|
|
from modules.database import col_applications
|
2022-12-10 11:42:56 +02:00
|
|
|
|
|
|
|
# Sponsorship command ==========================================================================================================
|
2022-12-27 19:46:17 +02:00
|
|
|
@app.on_message(~ filters.scheduled & (custom_filters.allowed | custom_filters.admin) & filters.command(["sponsorship"], prefixes=["/"]))
|
2022-12-27 14:36:54 +02:00
|
|
|
async def cmd_sponsorship(app: Client, msg: Message):
|
2022-12-27 19:46:17 +02:00
|
|
|
if HoloUser(msg.from_user).application_state()[0] == "fill":
|
2022-12-28 20:01:21 +02:00
|
|
|
await msg.reply_text(locale("finish_application", "message", locale=msg.from_user), quote=should_quote(msg))
|
2022-12-27 19:46:17 +02:00
|
|
|
return
|
2022-12-28 20:01:21 +02:00
|
|
|
await msg.reply_text(locale("sponsorship_apply", "message", locale=msg.from_user), reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text=str(locale("sponsor_apply", "button", locale=msg.from_user)), callback_data=f"sponsor_apply_{msg.from_user.id}")]]), quote=should_quote(msg))
|
2022-12-27 19:46:17 +02:00
|
|
|
# else:
|
|
|
|
# await msg.reply_text(locale("sponsorship_application_empty", "message"))
|
2022-12-10 11:42:56 +02:00
|
|
|
# ==============================================================================================================================
|