34 lines
1.5 KiB
Python
34 lines
1.5 KiB
Python
from app import app
|
|
from pyrogram import filters
|
|
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
|
|
from modules.utils import locale
|
|
|
|
# Rules command =============================================================================================================
|
|
default_rules_markup = InlineKeyboardMarkup(
|
|
[
|
|
[
|
|
InlineKeyboardButton(locale("rules_home", "button"), callback_data="rules_home"),
|
|
InlineKeyboardButton(locale("rules_additional", "button"), callback_data="rules_additional")
|
|
],
|
|
[
|
|
InlineKeyboardButton("1", callback_data="rule_1"),
|
|
InlineKeyboardButton("2", callback_data="rule_2"),
|
|
InlineKeyboardButton("3", callback_data="rule_3")
|
|
],
|
|
[
|
|
InlineKeyboardButton("4", callback_data="rule_4"),
|
|
InlineKeyboardButton("5", callback_data="rule_5"),
|
|
InlineKeyboardButton("6", callback_data="rule_6")
|
|
],
|
|
[
|
|
InlineKeyboardButton("7", callback_data="rule_7"),
|
|
InlineKeyboardButton("8", callback_data="rule_8"),
|
|
InlineKeyboardButton("9", callback_data="rule_9")
|
|
]
|
|
]
|
|
)
|
|
|
|
@app.on_message(~ filters.scheduled & filters.private & filters.command(["rules"], prefixes=["/"]))
|
|
async def cmd_rules(app, msg):
|
|
await msg.reply_text(locale("rules_msg"), disable_web_page_preview=True, reply_markup=default_rules_markup)
|
|
# ============================================================================================================================== |