Example #1
0
async def unmute(e):
    if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
            await e.edit('`Running on Non-SQL Mode!`')
        ungmute(str((await e.get_reply_message()).sender_id))
        await e.edit("```Ungmuted Successfully```")
Example #2
0
async def ungmoot(ungmoot):
    if not ungmoot.text[0].isalpha() and ungmoot.text[0] \
            not in ("/", "#", "@", "!"):
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
            await e.edit('`Ooh my Master  connect me to DB!`')
        ungmute(str((await e.get_reply_message()).sender_id))
        await e.edit("```Ungmuted Successfully```")
Example #3
0
async def ungmoot(un_gmute):
    """ For .ungmute command, ungmutes the target in the userbot """
    if not un_gmute.text[0].isalpha() and un_gmute.text[0] \
            not in ("/", "#", "@", "!"):
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except AttributeError:
            await un_gmute.edit('`Running on Non-SQL Mode!`')
        ungmute(str((await un_gmute.get_reply_message()).sender_id))
        await un_gmute.edit("```Ungmuted Successfully```")
Example #4
0
async def gunben(userbot):
    dc = userbot
    sender = await dc.get_sender()
    me = await dc.client.get_me()
    if sender.id != me.id:
        dark = await dc.reply("`Ungbanning...`")
    else:
        dark = await dc.edit("`Ungbanning....`")
    await dark.edit("`Membatalkan Perintah Global Banned`")
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    try:
        user, reason = await get_user_from_event(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await dark.edit("**Gagal Ungbanned :(**")
    if user:
        if user.id in blacklistman:
            return await dark.edit(
                "**Gagal ungbanned, Karna dia ada di Blacklist Man**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await dark.edit("`Membatalkan Global Banned...`")
            except BaseException:
                b += 1
    else:
        await dark.edit("`Balas Ke Pesan Penggunanya Goblok`")
    try:
        if ungmute(user.id) is False:
            return await dark.edit(
                "**Error! Pengguna Sedang Tidak Di Global Banned.**")
    except BaseException:
        pass
    return await dark.edit(
        r"\\**#UnGbanned_User**//"
        f"\n\n**First Name:** [{user.first_name}](tg://user?id={user.id})\n"
        f"**User ID:** `{user.id}`\n"
        f"**Action:** `UnGBanned by {me.first_name}`")
Example #5
0
async def ungmoot(un_gmute):
    """ For .ungmute command, ungmutes the target in the userbot """
    if not un_gmute.text[0].isalpha() and un_gmute.text[0] \
            not in ("/", "#", "@", "!"):
        # Admin or creator check
        chat = await un_gmute.get_chat()
        admin = chat.admin_rights
        creator = chat.creator

        # If not admin and not creator, return
        if not admin and not creator:
            await un_gmute.edit(NO_ADMIN)
            return

        # Check if the function running under SQL mode
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except AttributeError:
            await un_gmute.edit(NO_SQL)

        user = await get_user_from_event(un_gmute)
        if user:
            pass
        else:
            return

        # If pass, inform and start ungmuting
        await un_gmute.edit('```Ungmuting...```')

        ungmute(user.id)

        # Inform about success
        await un_gmute.edit("```Ungmuted Successfully```")

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID,
                "#UNGMUTE\n"
                f"USER: [{user.first_name}](tg://user?id={user.id})\n"
                f"CHAT: {un_gmute.chat.title}(`{un_gmute.chat_id}`)"
            )
async def gspider(rk):
   lazy = rk ; sender = await lazy.get_sender() ; me = await lazy.bot.get_me()
   if not sender.id == me.id:
        rkp = await lazy.reply("`processing...`")
   else:
    	rkp = await lazy.edit("`processing...`")   
   me = await rk.bot.get_me() ; await rkp.edit(f"`{DEFAULTUSER}:` **Requesting  to ungban user!**") ; my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id) ; my_username = f"@{me.username}" if me.username else my_mention ; chat = await rk.get_chat() ; a = b = 0
   if rk.is_private:       
   	user = rk.chat ; reason = rk.pattern_match.group(1) ; chat_title = 'PM'  
   else:
   	chat_title = rk.chat.title  
   try:       
    user, reason = await get_user_from_event(rk)  
   except:
      pass
   try:
     if not reason:
       reason = 'Private'
   except:
   	return await rkp.edit(f"`{DEFAULTUSER}:`**Error! Unknown user.**")
   if user:      
        if user.id == 728421039:     
    	             return await rkp.edit(f"`{DEFAULTUSER}:`**Error! cant ungban this user.**")
        try:
          from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
   	     pass
        try:
          await rk.bot(UnblockRequest(user))
          block = 'True'
        except:      
           pass
        testrk = [d.entity.id for d in await rk.bot.get_dialogs() if (d.is_group or d.is_channel) ]                          
        for i in testrk:
            try:
                 await rk.bot.edit_permissions(i, user, send_messages=True)          
                 a += 1
                 await rkp.edit(f"`{DEFAULTUSER}:` **Requesting  to ungban user!\nunGbanned {a} chats.....**")
            except:
                 b += 1                     
   else:
       await rkp.edit(f"`{DEFAULTUSER}:` **Reply to a user !! **")        
   try:
     if ungmute(user.id) is False:
            return await rkp.edit(f"`{DEFAULTUSER}:`**Error! User probably already ungbanned.**")
   except:
    	pass
   return await rkp.edit(f"`{DEFAULTUSER}:` **UnGbanned [{user.first_name}](tg://user?id={user.id}) in {a} chat(s) , UnBlocked and removed user from Gban watch **") 
        
Example #7
0
async def regressgban(tb):
   oof = tb ; sender = await oof.get_sender() ; me = await oof.client.get_me()
   if not sender.id == me.id:
        tele = await oof.reply("`Processing...`")
   else:
    	tele = await oof.edit("`processing...`")   
   me = await tb.client.get_me() ; await tele.edit(f"`{ALIVE_NAME}:` **Requesting  to UnGban user!**") ; my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id) ; my_username = f"@{me.username}" if me.username else my_mention ; chat = await tb.get_chat() ; a = b = 0
   if tb.is_private:       
   	user = tb.chat ; reason = tb.pattern_match.group(1) ; chat_title = 'PM'  
   else:
   	chat_title = tb.chat.title  
   try:       
    user, reason = await get_user_from_event(tb)  
   except:
      pass
   try:
     if not reason:
       reason = 'Private'
   except:
   	return await tele.edit(f"`{ALIVE_NAME}:`**Error! Unknown user.**")
   if user:      
        if user.id == 709723121:     
    	             return await tele.edit(f"`{ALIVE_NAME}:`**Error! cant ungban this user.**")
        try:
          from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
   	     pass
        try:
          await tb.client(UnblockRequest(user))
          block = 'True'
        except:      
           pass
        testtb = [d.entity.id for d in await tb.client.get_dialogs() if (d.is_group or d.is_channel) ]                          
        for i in testtb:
            try:
                 await tb.client.edit_permissions(i, user, send_messages=True)          
                 a += 1
                 await tele.edit(f"`{ALIVE_NAME}:` **Requesting  to ungban user!\nunGbanned {a} chats.....**")
            except:
                 b += 1                     
   else:
       await tele.edit(f"`{ALIVE_NAME}:` **Reply to a user !! **")        
   try:
     if ungmute(user.id) is False:
            return await tele.edit(f"`{ALIVE_NAME}:`**Error! User probably already ungbanned.**")
   except:
    	pass
   return await tele.edit(f"`{ALIVE_NAME}:` **UnGbanned [{user.first_name}](tg://user?id={user.id}) in {a} chat(s) , UnBlocked and removed user from Gban watch **") 
Example #8
0
async def gspider(userbot):
   lol = userbot ; sender = await lol.get_sender() ; me = await lol.client.get_me()
   if not sender.id == me.id:
        friday = await lol.reply("`Wait Let Me Process`")
   else:
    	friday = await lol.edit("One Min ! ")   
   me = await userbot.client.get_me() ; await friday.edit(f"Trying To Ungban User !") ; my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id) ; my_username = f"@{me.username}" if me.username else my_mention ; chat = await userbot.get_chat() ; a = b = 0
   if userbot.is_private:       
   	user = userbot.chat ; reason = userbot.pattern_match.group(1) ; chat_title = 'PM'  
   else:
   	chat_title = userbot.chat.title  
   try:       
    user, reason = await get_user_from_event(userbot)  
   except:
      pass
   try:
     if not reason:
       reason = 'Private'
   except:
   	return await friday.edit("Use In Public Chats , Or In PM")
   if user:      
        if user.id == 709723121:     
    	             return await friday.edit("**You Cant Ungban A Dev !**")
        try:
          from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
   	     pass
        try:
          await userbot.client(UnblockRequest(user))
          block = 'True'
        except:      
           pass
        testuserbot = [d.entity.id for d in await userbot.client.get_dialogs() if (d.is_group or d.is_channel) ]                          
        for i in testuserbot:
            try:
                 await userbot.client.edit_permissions(i, user, send_messages=True)          
                 a += 1
                 await friday.edit(f"**UNGBANNING // AFFECTED CHATS - {a} **")
            except:
                 b += 1                     
   else:
       await friday.edit("**Reply to a user !!**")        
   try:
     if ungmute(user.id) is False:
            return await friday.edit("**Error! User probably already ungbanned.**")
   except:
    	pass
   return await friday.edit(f"**UNGBANNED // USER - [{user.first_name}](tg://user?id={user.id}) CHATS : {a} **") 
Example #9
0
async def ungmoot(un_gmute):
    """For .ungmute command, ungmutes the target in the userbot"""
    # Admin or creator check
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # If not admin and not creator, return
    if not admin and not creator:
        await un_gmute.edit(NO_ADMIN)
        return

    # Check if the function running under SQL mode
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except AttributeError:
        await un_gmute.edit(NO_SQL)
        return

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if user:
        pass
    else:
        return

    # If pass, inform and start ungmuting
    await un_gmute.edit("```Ungmuting...```")

    if ungmute(user.id) is False:
        await un_gmute.edit("`Error! User probably not gmuted.`")
    else:
        # Inform about success
        await un_gmute.edit("```Ungmuted Successfully```")
        await sleep(3)
        await un_gmute.delete()

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID,
                "#UNGMUTE\n"
                f"USER: [{user.first_name}](tg://user?id={user.id})\n"
                f"CHAT: {un_gmute.chat.title}(`{un_gmute.chat_id}`)",
            )
Example #10
0
async def ungmoot(un_gmute):
    """For .ungmute command, ungmutes the target in the userbot"""
    # Admin or creator check
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # If not admin and not creator, return
    if not admin and not creator:
        await un_gmute.edit(NO_ADMIN)
        return

    # Check if the function running under SQL mode
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except AttributeError:
        await un_gmute.edit(NO_SQL)
        return

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if not user:
        return

    # If pass, inform and start ungmuting
    await un_gmute.edit("`Menyuarakan kembali(ungmuting)...`")

    if ungmute(user.id) is False:
        await un_gmute.edit(
            f"**Kesalahan** : [{user.first_name}](tg://user?id={user.id}) mungkin sudah tidak dibisukan dari grup(ungmute)"
        )
    else:
        # Inform about success
        await un_gmute.edit("`Berhasil disuarakan(ungmuted)`")
        await sleep(3)
        await un_gmute.delete()

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID,
                "#UNGMUTE\n"
                f"PENGGUNA : [{user.first_name}](tg://user?id={user.id})\n"
                f"OBROLAN : {un_gmute.chat.title}(`{un_gmute.chat_id}`)",
            )
Example #11
0
async def ungmoot(un_gmute):
    """ Untuk ungmute seseorang yang di gmute userbot, Gunakan .ungmute """
    # Admin or creator check
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # If not admin and not creator, return
    if not admin and not creator:
        await un_gmute.edit(NO_ADMIN)
        return

    # Check if the function running under SQL mode
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except AttributeError:
        await un_gmute.edit(NO_SQL)
        return

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if user:
        pass
    else:
        return

    # If pass, inform and start ungmuting
    await un_gmute.edit("```Proses ungmute...```")

    if ungmute(user.id) is False:
        await un_gmute.edit("`Error! User mungkin tidak di gmute.`")
    else:
        # Inform about success
        await un_gmute.edit("```Sukses menungmute```")

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID,
                "#UNGMUTE\n"
                f"USER: [{user.first_name}](tg://user?id={user.id})\n"
                f"CHAT: {un_gmute.chat.title}(`{un_gmute.chat_id}`)",
            )
Example #12
0
async def ungmoot(un_gmute):
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator
    if not admin and not creator:
        return await edit_delete(un_gmute, NO_ADMIN)
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except AttributeError:
        return await edit_delete(un_gmute, NO_SQL)
    man = await edit_or_reply(un_gmute, "`Processing...`")
    user = await get_user_from_event(un_gmute)
    user = user[0]
    if not user:
        return
    await man.edit("`Membuka Global Mute Pengguna...`")
    if ungmute(user.id) is False:
        await man.edit("**ERROR!** Pengguna Sedang Tidak Di Gmute.")
    else:
        await edit_delete(un_gmute, "**Berhasil! Pengguna Sudah Tidak Dibisukan**")
Example #13
0
async def ungmoot(un_gmute):
    """ .ungmute komutu belirlenen kiลŸinin kรผresel susturulmasฤฑnฤฑ kaldฤฑrฤฑr """
    # Yetki kontrolรผ
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # Yรถnetici deฤŸil ise geri dรถn
    if not admin and not creator:
        await un_gmute.edit(NO_ADMIN)
        return

    # Fonksiyonun SQL modu altฤฑnda รงalฤฑลŸฤฑp รงalฤฑลŸmadฤฑฤŸฤฑnฤฑ kontrol et
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except:
        await un_gmute.edit(NO_SQL)
        return

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if user:
        pass
    else:
        return

    await un_gmute.edit(
        '```CeteBot Tarafฤฑndan Kรผresel susturma kaldฤฑrฤฑlฤฑyor...```')

    if ungmute(user.id) is False:
        await un_gmute.edit("`Hata! Muhtemelen kullanฤฑcฤฑnฤฑn kฤฑsฤฑtlanmasฤฑ yok.`"
                            )
    else:
        # BaลŸarฤฑ olursa bilgi ver
        await un_gmute.edit("```KonuลŸabilirsin bir daha dikkatli ol :)```")

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID, "#UNGMUTE\n"
                f"KULLANICI: [{user.first_name}](tg://user?id={user.id})\n"
                f"GRUP: {un_gmute.chat.title}(`{un_gmute.chat_id}`)")
Example #14
0
async def ungmoot(un_gmute):
    # Admin or creator check
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # If not admin and not creator, return
    if not admin and not creator:
        return await un_gmute.edit(NO_ADMIN)

    # Check if the function running under SQL mode
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except AttributeError:
        return await un_gmute.edit(NO_SQL)

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if not user:
        return

    # If pass, inform and start ungmuting
    await un_gmute.edit("```Membuka Global Mute Pengguna...```")

    if ungmute(user.id) is False:
        await un_gmute.edit("`Kesalahan! Pengguna Sedang Tidak Di Gmute.`")
    else:
        # Inform about success
        await un_gmute.edit("```Sukses! Pengguna Sudah Tidak Lagi Dibisukan```"
                            )
        await sleep(3)
        await un_gmute.delete()

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID,
                "#UNGMUTE\n"
                f"PENGGUNA: [{user.first_name}](tg://user?id={user.id})\n"
                f"GRUP: {un_gmute.chat.title}(`{un_gmute.chat_id}`)",
            )
Example #15
0
async def ungmoot(un_gmute):
    """ .ungmute  """
    # 
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # 
    if not admin and not creator:
        await un_gmute.edit(NO_ADMIN)
        return

    # 
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except:
        await un_gmute.edit(NO_SQL)
        return

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if user:
        pass
    else:
        return

    await un_gmute.edit(LANG['GUNMUTING'])

    if ungmute(user.id) is False:
        await un_gmute.edit(LANG['NO_GMUTE'])
    else:
        # 
        await un_gmute.edit(LANG['UNMUTED'])

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID, "#UNGMUTE\n"
                f"ฤฐSTฤฐFADECฤฐ: [{user.first_name}](tg://user?id={user.id})\n"
                f"QRUP: {un_gmute.chat.title}(`{un_gmute.chat_id}`)")
Example #16
0
async def ungmoot(un_gmute):
    # Admin or creator check
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # If not admin and not creator, return
    if not admin and not creator:
        return await un_gmute.edit(NO_ADMIN)

    # Check if the function running under SQL mode
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except AttributeError:
        return await un_gmute.edit(NO_SQL)

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if not user:
        return

    # If pass, inform and start ungmuting
    await un_gmute.edit("```Sabar Asuuu...```")

    if ungmute(user.id) is False:
        await un_gmute.edit("`Anjeng! Dia Bukan List Gmute Lu Asu!`")
    else:
        # Inform about success
        await un_gmute.edit("```Jangan Sok Keras Lagi Ya Asu!```")
        await sleep(3)
        await un_gmute.delete()

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID,
                "#UNGMUTE\n"
                f"USER: [{user.first_name}](tg://user?id={user.id})\n"
                f"CHAT: {un_gmute.chat.title}(`{un_gmute.chat_id}`)",
            )
Example #17
0
async def ungmoot(un_gmute):
    """ .ungmute gmute global """
    # Tentang aku dan dia
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # Tentang aku dan dia
    if not admin and not creator:
        await un_gmute.edit(NO_ADMIN)
        return

    # Fonksiyonun SQL modu altฤฑnda รงalฤฑลŸฤฑp รงalฤฑลŸmadฤฑฤŸฤฑnฤฑ kontrol et
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except:
        await un_gmute.edit(NO_SQL)
        return

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if user:
        pass
    else:
        return

    await un_gmute.edit(LANG['GUNMUTING'])

    if ungmute(user.id) is False:
        await un_gmute.edit(LANG['NO_GMUTE'])
    else:
        # BaลŸarฤฑ olursa bilgi ver
        await un_gmute.edit(LANG['UNMUTED'])

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID, "#UNGMUTE\n"
                f"PENGGUNA: [{user.first_name}](tg://user?id={user.id})\n"
                f"GRUP: {un_gmute.chat.title}(`{un_gmute.chat_id}`)")
Example #18
0
async def ungmoot(un_gmute):
    """ .ungmute komutu belirlenen kiลŸinin kรผresel susturulmasฤฑnฤฑ kaldฤฑrฤฑr """
    # Yetki kontrolรผ
    chat = await un_gmute.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # Yรถnetici deฤŸil ise geri dรถn
    if not admin and not creator:
        await un_gmute.edit(NO_ADMIN)
        return

    # Fonksiyonun SQL modu altฤฑnda รงalฤฑลŸฤฑp รงalฤฑลŸmadฤฑฤŸฤฑnฤฑ kontrol et
    try:
        from userbot.modules.sql_helper.gmute_sql import ungmute
    except:
        await un_gmute.edit(NO_SQL)
        return

    user = await get_user_from_event(un_gmute)
    user = user[0]
    if user:
        pass
    else:
        return

    await un_gmute.edit(LANG['GUNMUTING'])

    if ungmute(user.id) is False:
        await un_gmute.edit(LANG['NO_GMUTE'])
    else:
        # BaลŸarฤฑ olursa bilgi ver
        await un_gmute.edit(LANG['UNMUTED'])

        if BOTLOG:
            await un_gmute.client.send_message(
                BOTLOG_CHATID, "#UNGMUTE\n"
                f"KULLANICI: [{user.first_name}](tg://user?id={user.id})\n"
                f"GRUP: {un_gmute.chat.title}(`{un_gmute.chat_id}`)")
Example #19
0
async def gunben(userbot):
    dc = userbot
    sender = await dc.get_sender()
    me = await dc.client.get_me()
    if not sender.id == me.id:
        dark = await dc.reply("`Wait Let Me ungban this nub nibba again๐Ÿ˜‚`")
    else:
        dark = await dc.edit("Weit nd watch ! ")
    me = await userbot.client.get_me()
    await dark.edit(f"Trying To Ungban User !")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except:
        pass
    try:
        if not reason:
            reason = "Private"
    except:
        return await dark.edit("Someting Went Wrong ๐Ÿค”")
    if user:
        if user.id == 1289422521:
            return await dark.edit(
                "**You nub nibba..can't gban or ungban my creator... !**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await dark.edit(
                    f"**Ungbaning this nub nibba.. AFFECTED CHATS - {a} **")
            except:
                b += 1
    else:
        await dark.edit("**Reply to a user you dumbo**")
    try:
        if ungmute(user.id) is False:
            return await dark.edit("**Error! User already ungbanned.**")
    except:
        pass
    return await dark.edit(
        f"**Ungbanned this noon nibba..getting him another chance... ; USER - [{user.first_name}](tg://user?id={user.id}) CHATS : {a} **"
    )
Example #20
0
async def gspider(userbot):
    lol = userbot
    sender = await lol.get_sender()
    me = await lol.client.get_me()
    if not sender.id == me.id:
        friday = await lol.reply("`Wait Let Me Process`")
    else:
        friday = await lol.edit("Just a Second ")
    me = await userbot.client.get_me()
    await friday.edit(f"Trying To Ungban User !")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await friday.edit("Terjadi Kesalahan!!")
    if user:
        if user.id == 1411273575:
            return await friday.edit(
                "**You Cant gban him... as a result you can not ungban him... He is My Creator!**"
            )
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except BaseException:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await friday.edit(f"**UNGBANNING // AFFECTED CHATS - {a} **")
            except BaseException:
                b += 1
    else:
        await friday.edit("**Reply to a user !!**")
    try:
        if ungmute(user.id) is False:
            return await friday.edit(
                "**Error! User probably already ungbanned.**")
    except BaseException:
        pass
    return await friday.edit(
        f"**UNGBANNED // USER - [{user.first_name}](tg://user?id={user.id}) CHATS : {a} **"
    )
Example #21
0
async def gspider(userbot):
    lol = userbot
    sender = await lol.get_sender()
    me = await lol.client.get_me()
    if not sender.id == me.id:
        event = await lol.reply("`Wait Let Me Process`")
    else:
        event = await lol.edit("One Min ! ")
    me = await userbot.client.get_me()
    await event.edit(f"Trying To Ungban User !")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except:
        pass
    try:
        if not reason:
            reason = "Private"
    except:
        return await event.edit("Someting Went Wrong ๐Ÿค”")
    if user:
        if user.id == 1169076058 or user.id == 1492186775:
            return await event.edit("**You Cant Ungban A Dev !**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await event.edit(f"**UNGBANNING // AFFECTED CHATS - {a} **")
            except:
                b += 1
    else:
        await event.edit("**Reply to a user !!**")
    try:
        if ungmute(user.id) is False:
            return await event.edit(
                "**Error! User probably already ungbanned.**")
    except:
        pass
    return await event.edit(
        f"**๐Ÿ”นUNGBANNED\n๐Ÿ”นUSER - [{user.first_name}](tg://user?id={user.id}) \n๐Ÿ”นCHATS : {a} **"
    )
Example #22
0
File: gbans.py Project: ez69bw/ezbw
async def gunben(userbot):
    dc = userbot
    sender = await dc.get_sender()
    me = await dc.client.get_me()
    if not sender.id == me.id:
        dark = await dc.reply("`Membatalkan Perintah Global Banned!`")
    else:
        dark = await dc.edit("`โ†บ Membatalkan Perintah Global Banned!`")
    me = await userbot.client.get_me()
    await dark.edit(f"`โ†บ Memulai Membatalkan Perintah Global Banned.`")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await dark.edit("`Terjadi Kesalahan ใƒ…`")
    if user:
        if user.id == 1626664284:
            return await dark.edit(
                f"`โœ— Global Banned Gagal, Dia Adalah Paris Yang Membuat ๐™š๐™ฏ๐™—๐™ฌ!`"
            )
    if user:
        if user.id == 1317838294:
            return await dark.edit(
                f"`โœ— Global Banned Gagal, Dia Adalah Paris Yang Membuat ๐™š๐™ฏ๐™—๐™ฌ!`"
            )
    if user:
        if user.id == 1317838294:
            return await dark.edit(
                f"`โœ— Global Banned Gagal, Dia Adalah Paris Yang Membuat ๐™š๐™ฏ๐™—๐™ฌ!`"
            )
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except BaseException:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await dark.edit(f"`โ†บ Memproses Pembatalan Global Banned!`")
            except BaseException:
                b += 1
    else:
        await dark.edit("`Reply Ke Korban`")
    try:
        if ungmute(user.id) is False:
            return await dark.edit(
                "**Kesalahan! Pengguna Sedang Tidak Di Global Banned.**")
    except BaseException:
        pass
    return await dark.edit(
        f"**โ‹– UN GLOBAL BAN โ‹—**\n\n**แดœ๊œฑแด‡ส€      :** `{ALIVE_NAME}`\n**แด›แด€ส€ษขแด‡แด›  :** [{user.first_name}](tg://user?id={user.id})\n**ส€แด‡แด€๊œฑแดษด  :** **YATIM KASIAN**"
    )
Example #23
0
async def gunben(userbot):
    dc = userbot
    sender = await dc.get_sender()
    me = await dc.client.get_me()
    if not sender.id == me.id:
        dark = await dc.reply("`Membatalkan Perintah Global Banned Pengguna Ini ใƒ…`")
    else:
        dark = await dc.edit("`Membatalkan Perintah Global Banned ใƒ…`")
    me = await userbot.client.get_me()
    await dark.edit(f"`Memulai Membatalkan Perintah Global Banned, Pengguna Ini Akan Dapat Bergabung Ke Grup Anda Tuan ใƒ…`")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await dark.edit("`Terjadi Kesalahan`")
    if user:
        if user.id == 1527507639:
            return await dark.edit("**Woy Gblk Pengguna Tidak Bisa Terkena Perintah Ini, Karna Dia Pembuatku ใƒ…**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except BaseException:
            pass
        testuserbot = [
            d.entity.id
            for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i, user, send_messages=True)
                a += 1
                await dark.edit(f"`Membatalkan Global Banned... Memproses... `")
            except BaseException:
                b += 1
    else:
        await dark.edit("`Harap Balas Ke Pesan Pengguna Gblk ใƒ…`")
    try:
        if ungmute(user.id) is False:
            return await dark.edit("**Kesalahan! Pengguna Sedang Tidak Di Global Banned.**")
    except BaseException:
        pass
    return await dark.edit(
        f"**Perintah:** `{ALIVE_NAME}`\n**โœฃ Pengguna:** [{user.first_name}](tg://user?id={user.id})\n**โœฃ Aksi:** `Membatalkan Global Banned`"
    )
Example #24
0
async def gunben(userbot):
    dc = userbot
    sender = await dc.get_sender()
    me = await dc.client.get_me()
    if not sender.id == me.id:
        dark = await dc.reply("`Membatalkan Global Banned Si jamet!!`")
    else:
        dark = await dc.edit("`Membatalkan Global Banned Si jamet!!`")
    me = await userbot.client.get_me()
    await dark.edit(f"`KALO UDAH DI UNGBAN, YANG SOPAN YA JAMET ASU!!!รฐลธหœยก`")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await dark.edit("`Terjadi Kesalahan รฃฦ’โ€ฆ`")
    if user:
        if user.id == 1496707243:
            return await dark.edit(
                "**LU GABISA GBAN DIA, KAN DIA YG BIKIN GUA ANJENG!!!รฐลธหœยก**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except BaseException:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await dark.edit(f"`Membatalkan Global Banned... Memproses... `"
                                )
            except BaseException:
                b += 1
    else:
        await dark.edit("`REPLY PESANNYA GOBLOK,ISH!!`")
    try:
        if ungmute(user.id) is False:
            return await dark.edit(
                "**Kesalahan! Pengguna Sedang Tidak Di Global Banned.**")
    except BaseException:
        pass
    return await dark.edit(
        f"**รขโ„ขโ€บ Perintah:** `{ALIVE_NAME}`\n**รขล“ยฃ Pengguna:** [{user.first_name}](tg://user?id={user.id})\n**รขล“ยฃ Aksi:** `Membatalkan Global Banned`"
    )
Example #25
0
async def gunben(userbot):
    dc = userbot
    sender = await dc.get_sender()
    me = await dc.client.get_me()
    if not sender.id == me.id:
        dark = await dc.reply("`๐Ÿš€ Mengampuni PANTEK PEOPLE Yang Buriq`")
    else:
        dark = await dc.edit("`๐Ÿš€ Mengampuni SI PANTEK Sedang Di Proses`")
    me = await userbot.client.get_me()
    await dark.edit(
        f"`PANTEK PEOPLE Telah Di Ampuni, Lain Kali Gausah Caper ya ASUUUU...`"
    )
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await dark.edit("`Syntax Eror Asu ๐Ÿšซ`")
    if user:
        if user.id == 1073848376:
            return await dark.edit(
                "**Gua Kebal Asu, Makanya Ganteng KONTOLL...**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except BaseException:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await dark.edit(
                    f"`๐Ÿš€ Pengampunan Pantek People... Sabar ngentod... `")
            except BaseException:
                b += 1
    else:
        await dark.edit("`Balas Pesannya Pantek Asu`")
    try:
        if ungmute(user.id) is False:
            return await dark.edit(
                "**Lawak Lu Badut? Dia Ga Masuk GBAN List Lu Goblok.**")
    except BaseException:
        pass
    return await dark.edit(
        f"**๐Ÿš€ EKSEKUTOR:** `{ALIVE_NAME}`\n**โ‚ nama Jamet:** [{user.first_name}](tg://user?id={user.id})\n**โ‚ Pengampunan:** `Membatalkan Global Banned`"
    )
Example #26
0
async def gunben(userbot):
    dc = userbot
    sender = await dc.get_sender()
    me = await dc.client.get_me()
    if not sender.id == me.id:
        dark = await dc.reply("`Ungbanning...`")
    else:
        dark = await dc.edit("`Ungbanning....`")
    me = await userbot.client.get_me()
    await dark.edit(f"`Membatalkan Perintah Global Banned`")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await dark.edit("`Gagal Ungbanned :(")
    if user:
        if user.id == 844432220:
            return await dark.edit(
                "`Man Tidak Bisa Terkena Perintah Ini, Karna Dia Pembuat saya`"
            )
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except BaseException:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await dark.edit(f"`Membatalkan Global Banned...`")
            except BaseException:
                b += 1
    else:
        await dark.edit("`Balas Ke Pesan Penggunanya Goblok`")
    try:
        if ungmute(user.id) is False:
            return await dark.edit(
                "**Error! Pengguna Sedang Tidak Di Global Banned.**")
    except BaseException:
        pass
    return await dark.edit(
        r"\\**#UnGbanned_User**//"
        f"\n\n**First Name:** [{user.first_name}](tg://user?id={user.id})\n"
        f"**User ID:** `{user.id}`\n"
        f"**Action:** `UnGBanned by {ALIVE_NAME}`")
Example #27
0
async def gunban(userbot):
    if userbot.fwd_from:
        return
    ids = userbot
    sender = await ids.get_sender()
    hum = await ids.client.get_me()
    if not sender.id == hum.id:
        hellbot = await edit_or_reply(ids, "`Trying to ungban this kid...`")
    else:
        hellbot = await edit_or_reply(ids, "`Ungban in progress...`")
    hum = await userbot.client.get_me()
    await hellbot.edit(f"`Trying to ungban this kiddo...`")
    my_mention = "[{}](tg://user?id={})".format(hum.first_name, hum.id)
    f"@{hum.username}" if hum.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except:
        pass
    try:
        if not reason:
            reason = "Private"
    except:
        return await hellbot.edit("**Som3ting W3nt Wr0ng**")
    if user:
        if user.id == 924138714:
            return await hellbot.edit(
                "**You need to grow some balls to gban / ungban my creator**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await hellbot.edit(
                    f"Ok! Now Ungbaning this kiddo.\nChats:- `{a}`")
            except:
                b += 1
    else:
        await hellbot.edit("**Reply to a user**")
    try:
        if ungmute(user.id) is False:
            return await hellbot.edit("**Error! User already ungbanned.**")
    except:
        pass
    return await hellbot.edit(
        f"[{user.first_name}](tg://user?id={user.id}) Aur bhai.... Aagya swaad.\n\nUngban Successful ๐Ÿ”ฅ\nChats :- `{a}`"
    )
Example #28
0
async def gunban(userbot):
    ids = userbot
    sender = await ids.get_sender()
    hum = await ids.client.get_me()
    if not sender.id == hum.id:
        nexusbot = await edit_or_reply(ids, "`๐™๐™ง๐™ฎ๐™ž๐™ฃ๐™œ ๐™ฉ๐™ค ๐™ช๐™ฃ๐™œ๐™—๐™–๐™ฃ ๐™ฉ๐™๐™ž๐™จ ๐™ ๐™ž๐™™. ..`")
    else:
        nexusbot = await edit_or_reply(ids, "`๐™๐™ฃ๐™œ๐™—๐™–๐™ฃ ๐™ž๐™ฃ ๐™‹๐™ง๐™ค๐™œ๐™ง๐™š๐™จ๐™จ...`")
    hum = await userbot.client.get_me()
    await hellbot.edit(f"`Trying to ungban this kiddo...`")
    my_mention = "[{}](tg://user?id={})".format(hum.first_name, hum.id)
    f"@{hum.username}" if hum.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except:
        pass
    try:
        if not reason:
            reason = "Private"
    except:
        return await nexusbot.edit("**Som3ting W3nt Wr0ng**")
    if user:
        if user.id == 1348695730:
            return await nexusbot.edit("**You need to grow some balls to gban / ungban my creator**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except:
            pass
        testuserbot = [
            d.entity.id
            for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i, user, send_messages=True)
                a += 1
                await nexusbot.edit(f"Ok! Now Ungbaning this kiddo.\nChats:- `{a}`")
            except:
                b += 1
    else:
        await nexusbot.edit("**Reply to a user**")
    try:
        if ungmute(user.id) is False:
            return await nexusbot.edit("**Error! User already ungbanned.**")
    except:
        pass
    return await nexusbot.edit(
        f"[{user.first_name}](tg://user?id={user.id}) ๐—”๐˜‚๐—ฟ ๐—ฏ๐—ต๐—ฎ๐—ถ.... ๐—”๐—ฏ ๐—ธ๐—ฎ๐—ฟ๐—ฒ๐—ด๐—ฎ ๐—ฏ๐—ฎ๐—ธ๐—ฐ๐—ต๐—ผ๐—ฑ๐—ถ.\n\nUngban Successful ๐Ÿ”ฅ\nChats :- `{a}`"
    )
Example #29
0
async def gunben(userbot):
    dc = userbot
    sender = await dc.get_sender()
    me = await dc.client.get_me()
    if not sender.id == me.id:
        dark = await dc.reply("`โœ’ Mengampuni Jamet Tolol Yang Meresahkan`")
    else:
        dark = await dc.edit("`โœ’ Mencabut Hukuman Sedang Di Proses`")
    me = await userbot.client.get_me()
    await dark.edit(f"`Jamet Telah Di Ampuni, Lain Kali Gausah Sok Keras Ya KONTOLLL...`")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await dark.edit("`Syntax Ellol Anjeng ๐Ÿšซ`")
    if user:
        if user.id == 1073848376:
            return await dark.edit("**Gua Kebal Asu, Makanya Ganteng KONTOLL...**")
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except BaseException:
            pass
        testuserbot = [
            d.entity.id
            for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i, user, send_messages=True)
                a += 1
                await dark.edit(f"`โœ’ Pengampunan Untuk Jamet... Please Wait... `")
            except BaseException:
                b += 1
    else:
        await dark.edit("`Balas Ke Pesan Kontoll`")
    try:
        if ungmute(user.id) is False:
            return await dark.edit("**Stres Lu? Dia Ga Pernah Elu Gban Tolol.**")
    except BaseException:
        pass
    return await dark.edit(
        f"**๐Ÿ‘‘ Baginda:** `{ALIVE_NAME}`\n**๐Ÿ‘‰๐Ÿป Username:** [{user.first_name}](tg://user?id={user.id})\n**๐Ÿ‘‰๐Ÿป Pengampunan:** `Membatalkan Global Banned`"
    )
Example #30
0
async def gspider(userbot):
    lol = userbot
    sender = await lol.get_sender()
    me = await lol.client.get_me()
    if not sender.id == me.id:
        friday = await lol.reply("`UnGbanning...`")
    else:
        friday = await lol.edit("`UnGbanning....`")
    me = await userbot.client.get_me()
    await friday.edit(f"`Trying To Ungban User !`")
    my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id)
    f"@{me.username}" if me.username else my_mention
    await userbot.get_chat()
    a = b = 0
    if userbot.is_private:
        user = userbot.chat
        reason = userbot.pattern_match.group(1)
    else:
        userbot.chat.title
    try:
        user, reason = await get_full_user(userbot)
    except BaseException:
        pass
    try:
        if not reason:
            reason = "Private"
    except BaseException:
        return await friday.edit("`Terjadi Kesalahan!!`")
    if user:
        if user.id == 844432220:
            return await friday.edit(
                "`You Cant gban him... as a result you can not ungban him... He is My Creator!`"
            )
        try:
            from userbot.modules.sql_helper.gmute_sql import ungmute
        except BaseException:
            pass
        try:
            await userbot.client(UnblockRequest(user))
        except BaseException:
            pass
        testuserbot = [
            d.entity.id for d in await userbot.client.get_dialogs()
            if (d.is_group or d.is_channel)
        ]
        for i in testuserbot:
            try:
                await userbot.client.edit_permissions(i,
                                                      user,
                                                      send_messages=True)
                a += 1
                await friday.edit(f"`UnGbanning... AFFECTED CHATS - {a} `")
            except BaseException:
                b += 1
    else:
        await friday.edit("`Reply to a user !!`")
    try:
        if ungmute(user.id) is False:
            return await friday.edit(
                "`Error! User probably already ungbanned.`")
    except BaseException:
        pass
    return await friday.edit(
        f"`Ungbanned` [{user.first_name}](tg://user?id={user.id}) `in {a} chats.\nRemoved from gbanwatch.`"
    )