This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Telegram/modules/commands/issue.py

31 lines
904 B
Python
Raw Normal View History

2023-01-23 15:39:38 +02:00
from app import app
from pyrogram import filters
2023-03-09 17:31:39 +02:00
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message
2023-01-23 15:39:38 +02:00
from pyrogram.client import Client
from modules.utils import configGet, locale
from modules import custom_filters
2023-03-09 17:25:06 +02:00
@app.on_message(
custom_filters.enabled_general
& ~filters.scheduled
& filters.private
& filters.command(["issue"], prefixes=["/"])
& ~custom_filters.banned
)
2023-01-23 15:39:38 +02:00
async def cmd_issue(app: Client, msg: Message):
2023-03-09 17:25:06 +02:00
await msg.reply_text(
locale("issue", "message", locale=msg.from_user),
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
2023-01-23 15:39:38 +02:00
[
[
2023-03-09 17:25:06 +02:00
InlineKeyboardButton(
locale("issue", "button", locale=msg.from_user),
url=configGet("issues"),
)
2023-01-23 15:39:38 +02:00
]
]
2023-03-09 17:25:06 +02:00
),
)