from Zaid import Zaid, BOT_USERNAME
from Config import Config
from telethon import events, Button

PM_START_TEXT = """
Êœá´‡Ê�á´€! {}

â€¢ Éª'á´� á´€ êœ±Éªá´�á´˜ÊŸá´‡ á´›á´‡ÊŸá´‡É¢Ê€á´€á´� á´�á´œêœ±Éªá´„ Ê™á´�á´›.
â€¢ Éª á´„á´€É´ á´˜ÊŸá´€Ê� êœ±á´�É´É¢êœ± ÉªÉ´ Ê�á´�á´œÊ€ á´ á´�Éªá´„á´‡.
â€¢ á´›ÊœÉªêœ± Ê™á´�á´› Ê™á´€êœ±á´‡á´… á´�É´ á´›á´‡ÊŸá´‡á´›Êœá´�É´. êœ±á´� Éªá´›'êœ± á´˜Ê€á´�á´ Éªá´…á´‡ á´�á´�Ê€á´‡ êœ±á´›á´€Ê™ÉªÊŸÉªá´›Ê� êœ°Ê€á´�á´� á´�á´›Êœá´‡Ê€ Ê™á´�á´›êœ±!
â€¢ Éª á´„á´€É´ á´…á´� á´�á´›Êœá´‡Ê€ á´›ÊœÉªÉ´É¢êœ± ÊŸÉªá´‹á´‡ á´˜ÉªÉ´êœ± á´‡á´›á´„êœ±.

â�» **á´„ÊŸÉªá´„á´‹ á´�É´ Êœá´‡ÊŸá´˜ Ê™á´œá´›á´›á´�É´ êœ°á´�Ê€ á´�á´�Ê€á´‡ ÉªÉ´êœ°á´�Ê€á´�á´€á´›Éªá´�É´**.
"""

@Zaid.on(events.NewMessage(pattern="^[?!/]start$"))
async def start(event):
    if Config.MANAGEMENT_MODE == "ENABLE":
        return
    if event.is_private:
       await event.client.send_file(event.chat_id,
             Config.START_IMG,
             caption=PM_START_TEXT.format(event.sender.first_name), 
             buttons=[
        [Button.url("âœ¨ á´€á´…á´… á´�á´‡", f"https://t.me/{BOT_USERNAME}?startgroup=true"), Button.inline("ğŸ¥€ Êœá´‡ÊŸá´˜", data="help")]])
       return

    if event.is_group:
       await event.reply("**Êœá´‡Ê�! Éª'á´� êœ±á´›ÉªÊŸÊŸ á´€ÊŸÉªá´ á´‡ âœ…**")
       return



@Zaid.on(events.callbackquery.CallbackQuery(data="start"))
async def _(event):
    if Config.MANAGEMENT_MODE == "ENABLE":
        return
    if event.is_private:
       await event.edit(PM_START_TEXT.format(event.sender.first_name), buttons=[
        [Button.url("âœ¨ á´€á´…á´… á´�á´‡", f"https://t.me/{BOT_USERNAME}?startgroup=true"), Button.inline("ğŸ¥€ Êœá´‡ÊŸá´˜", data="help")]])
       return
