예제 #1
0
async def unload(event):
    if event.fwd_from:
        return
    shortname = event.pattern_match["shortname"]
    try:
        remove_plugin(shortname)
        qwe = await eor(event, f"EAGLE Has Successfully unloaded {shortname}")
    except Exception as e:
        await qwe.edit(
            "UltraX has Successfully unloaded {shortname}\n{}".format(
                shortname, str(e)))
예제 #2
0
async def load(event):
    if event.fwd_from:
        return
    shortname = event.pattern_match["shortname"]
    try:
        try:
            remove_plugin(shortname)
        except BaseException:
            pass
        load_module(shortname)
        qwe = await eor(event, f"Successfully loaded {shortname}")
    except Exception as e:
        await qwe.edit(
            f"ULTRA X could not load {shortname} because of the following error.\n{str(e)}"
        )
예제 #3
0
    async def on_plug_in_callback_query_handler(event):
              if event.query.user_id == bot.uid or event.query.user_id == id:
                    
                    
                    try:
                        fcix = [custom.Button.inline(" ⁂ ✪ 𝐁𝐚𝐜𝐤 ✪ ⁂ ",data="back({})".format(shivam)),custom.Button.inline(" ⁂ ✪ 𝐂𝐥𝐨𝐬𝐞 ✪ ⁂ ", data="close"),custom.Button.inline(" ⁂ ✪ 𝐥𝐨𝐚𝐝 ✪ ⁂ ",data="load({})".format(shivam_sh1vam))]
                        remove_plugin(event.data_match.group(1).decode("UTF-8"))
#kyu sir kang krne m muskil ho rhi h kya bologe toh help krdu 😂😂
                        await event.edit( "`Yᴏᴜʀ UʟᴛʀᴀX ʜᴀs sᴜᴄᴄᴇssғᴜʟʟʏ ᴜɴʟᴏᴀᴅᴇᴅ` >>>" + str(event.data_match.group(1).decode("UTF-8")),buttons=fcix)
                    except Exception as e:
                        await event.edit("Error{}".format(shortname, str(e)) +"UʟᴛʀᴀX ʜᴀs sᴜᴄᴄᴇssғᴜʟʟʏ ᴜɴʟᴏᴀᴅᴇᴅ"+ str(event.data_match.group(1).decode("UTF-8")),buttons=fcix)
              else:
                    shortname = event.data_match.group(1).decode("UTF-8")
                    fcix = [custom.Button.inline(" ⁂ ✪ 𝐁𝐚𝐜𝐤 ✪ ⁂ ",data="back({})".format(shivam)),custom.Button.inline(" ⁂ ✪ 𝐂𝐥𝐨𝐬𝐞 ✪ ⁂ ", data="close"),custom.Button.inline(" ⁂ ✪ 𝐋𝐨𝐚𝐝 ✪ ⁂ ",data="load({})".format(shivam_sh1vam))]
                    reply_pop_up_alert = "Pʟᴇᴀsᴇ Gᴇᴛ Yᴏᴜʀ Oᴡɴ Usᴇʀʙᴏᴛ (☞ ͡° ͜ʖ ͡°)☞ Fᴏʀ Mᴏʀᴇ ɪɴғᴏ Vɪsɪᴛ @UltraX_Support !!"
                    await event.answer(reply_pop_up_alert, alert=True)
예제 #4
0
파일: x.py 프로젝트: sahilsi478/ULTRA-X
    async def on_plug_in_callback_query_handler(event):
        if event.query.user_id == bot.uid or event.query.user_id == id:

            try:
                fcix = [
                    custom.Button.inline(" 𝕭𝖆𝖈𝖐 ",
                                         data="back({})".format(shivam)),
                    custom.Button.inline(" 𝕮𝖑𝖔𝖘𝖊 ", data="close"),
                    custom.Button.inline(" 𝕷𝖔𝖆𝖉 ",
                                         data="load({})".format(shivam_sh1vam))
                ]
                remove_plugin(
                    event.data_match.group(1).decode("UTF-8")
                )  #kyu sir kang krne m muskil ho rhi h kya bologe toh help krdu 😂😂
                await event.edit(
                    "`Your LEGEND BOT Has Successfully unloaded` >>>" +
                    str(event.data_match.group(1).decode("UTF-8")),
                    buttons=fcix)
            except Exception as e:
                await event.edit(
                    "Error{}".format(shortname, str(e)) +
                    "LEGENDBOT Has Successfully unloaded" +
                    str(event.data_match.group(1).decode("UTF-8")),
                    buttons=fcix)
        else:
            shortname = event.data_match.group(1).decode("UTF-8")
            fcix = [
                custom.Button.inline("  𝕭𝖆𝖈𝖐 ",
                                     data="back({})".format(shivam)),
                custom.Button.inline(" 𝕮𝖑𝖔𝖘𝖊 ", data="close"),
                custom.Button.inline(" 𝕷𝖔𝖆𝖉 ",
                                     data="load({})".format(shivam_sh1vam))
            ]
            reply_pop_up_alert = "Pʟᴇᴀsᴇ Gᴇᴛ Yᴏᴜʀ Oᴡɴ Usᴇʀʙᴏᴛ (☞ ͡° ͜ʖ ͡°)☞ Fᴏʀ Mᴏʀᴇ ɪɴғᴏ Vɪsɪᴛ @UltraX_Support !!"
            await event.answer(reply_pop_up_alert, cache_time=0,
                               alert=True)  #hehehe