# New file
from pyrogram.filters import command, edited
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message
from wbb import BOT_USERNAME, app
MARKDOWN = """
Read the below text carefully to find out how formatting works!
Supported Fillings:
{name} - This will mention the user with their name.
{chat} - This will fill with the current chat name.
NOTE: Fillings only works in greetings module.
Supported formatting:
**Bold** : Creates bold text.
~~strike~~: Creates striked text.
__italic__: Creates italic text.
--underline--: Creates underline text.
`code words`: Creates code words text.
[hyperlink](google.com): Creates hyperlink text.
Note: You can use both markdown & html tags.
Button formatting:
-> text ~ [button text, button link]
Example:
example button with markdown formatting ~ [button text, https://google.com]
"""
@app.on_message(command("markdownhelp") & ~edited)
async def mkdwnhelp(_, m: Message):
keyb = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text="Click Here!",
url=f"http://t.me/{BOT_USERNAME}?start=mkdwn_help",
)
]
]
)
if m.chat.type != "private":
await m.reply(
"Click on the below button to get markdown usage syntax in pm!",
reply_markup=keyb,
)
else:
await m.reply(MARKDOWN, parse_mode="html", disable_web_page_preview=True)
return