from pyrogram import filters
from aiohttp import ClientSession
from pyrogram import Client as bot
from plugins.function import make_carbon
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
aiohttpsession = ClientSession()

C = "**ğ�™¼ğ�™°ğ�™³ğ�™´ ğ�™±ğ�šˆ [ğ�™°ğ�™¹ğ�™°ğ�š‡](https://t.me/Devil0Bot_Bot)**"
F = InlineKeyboardMarkup(
[[
     InlineKeyboardButton("ğ�š„ğ�™¿ğ�™³ğ�™°ğ�šƒğ�™´ğ�š‰ ğ�™²ğ�™·ğ�™°ğ�™½ğ�™½ğ�™´ğ�™»", url="https://t.me/OpusTechz")
]]
)




@bot.on_message(filters.command("carbon"))
async def carbon_func(_, message):
    if not message.reply_to_message:
        return await message.reply_text(
            "**ğ�š�ğ�™´ğ�™¿ğ�™»ğ�šˆ ğ�šƒğ�™¾ ğ�™°ğ�™½ğ�šˆ ğ�šƒğ�™´ğ�š‡ğ�šƒ ğ�™¼ğ�™´ğ�š‚ğ�š‚ğ�™°ğ�™¶ğ�™´ ğ�šƒğ�™¾ ğ�™¼ğ�™°ğ�™ºğ�™´ ğ�™²ğ�™°ğ�š�ğ�™±ğ�™¾ğ�™½.**"
        )
    if not message.reply_to_message.text:
        return await message.reply_text(
            "**ğ�š�ğ�™´ğ�™¿ğ�™»ğ�šˆ ğ�šƒğ�™¾ ğ�™°ğ�™½ğ�šˆ ğ�šƒğ�™´ğ�š‡ğ�šƒ ğ�™¼ğ�™´ğ�š‚ğ�š‚ğ�™°ğ�™¶ğ�™´ ğ�šƒğ�™¾ ğ�™¼ğ�™°ğ�™ºğ�™´ ğ�™²ğ�™°ğ�š�ğ�™±ğ�™¾ğ�™½.**"
        )
    user_id = message.from_user.id
    m = await message.reply_text("**ğ�™²ğ�š�ğ�™´ğ�™°ğ�šƒğ�™¸ğ�™½ğ�™¶ ğ�™²ğ�™°ğ�š�ğ�™±ğ�™¾ğ�™½...**")
    carbon = await make_carbon(message.reply_to_message.text)
    await m.edit("**ğ�š„ğ�™¿ğ�™»ğ�™¾ğ�™°ğ�™³ğ�™¸ğ�™½ğ�™¶ ğ�™²ğ�™°ğ�š�ğ�™±ğ�™¾ğ�™½...**")
    await message.reply_photo(
        photo=carbon,
        caption=C,
        reply_markup=F)
    await m.delete()
    carbon.close()
