Beispiel #1
0
async def spider(spdr):
    try:
        from userbot.plugins.sql_helper.mute_sql import mute
    except AttributeError:
        await spdr.delete()
        return

    # Admin or creator check
    chat = await spdr.get_chat()
    admin = chat.admin_rights
    creator = chat.creator

    # If not admin and not creator, return
    if not admin and not creator:
        await spdr.reply(NO_ADMIN)
        return

    user, reason = await get_user_from_event(spdr)
    if user:
        pass
    else:
        return

    self_user = await spdr.client.get_me()

    if user.id == self_user.id:
        await spdr.reply(f"Sorry, I can't mute my self")
        return

    if mute(spdr.chat_id, user.id) is False:
        return await spdr.reply(f"Error! User probably already muted.")
    else:
        try:
            await spdr.client(
                EditBannedRequest(spdr.chat_id, user.id, MUTE_RIGHTS))

            # Announce that the function is done
            if reason:
                await spdr.reply(
                    f"{user.first_name} was muted in {spdr.chat.title}\n"
                    f"`Reason:`{reason}")
            else:
                await spdr.reply(
                    f"{user.first_name} was muted in {spdr.chat.title}")

            # Announce to logging group
            if BOTLOG:
                await spdr.client.send_message(
                    BOTLOG_CHATID, "#MUTE\n"
                    f"USER: [{user.first_name}](tg://user?id={user.id})\n"
                    f"CHAT: {spdr.chat.title}(`{spdr.chat_id}`)")
        except UserIdInvalidError:
            return await spdr.reply("`Uh oh my mute logic broke!`")
Beispiel #2
0
async def startgmute(event):
    private = False
    if event.fwd_from:
        return
        userid = event.chat_id
    if user_id == (await borg.get_me()).id:
        await event.edit(r"LoL. Why would I Gmute u. You are my owner")
        return
    if user_id in Config.SUDO_USERS:
        await event.edit(
            "**He has more power than me.**\nPerhaps I can't gmute him.\n\n"
            "**Tip:** He iz sudo user.")
        return
    elif event.is_private:
        await event.edit("Putting Duct Tape on that person's mouth!")
        await asyncio.sleep(3)
        private = True
    reply = await event.get_reply_message()
    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit(
            "Please reply to a user or add their into the command to gmute them."
        )
    chat_id = event.chat_id
    chat = await event.get_chat()
    if is_muted(userid, "gmute"):
        return await event.edit(
            "Duct Tape is already availabe on this user's mouth")
    try:
        mute(userid, "gmute")
    except Exception as e:
        await event.edit("Error occured!\nError is " + str(e))
    else:
        await event.edit("Successfully putted Duct Tape on that person's mouth"
                         )
Beispiel #3
0
async def b*****b(event):
    private = False
    if event.fwd_from:
        return
    reply = await event.get_reply_message()
    user_id = reply.from_id
    if user_id == (await borg.get_me()).id:
        await edit_or_reply(
            event, "I guess you need some rest. You are trying to gmute yourself😌"
        )

        return
    elif event.is_private:
        await edit_or_reply(event, "`Son can't speak now🤐. Filled mouth with cum`💦")
        await asyncio.sleep(3)
        private = True
    reply = await event.get_reply_message()
    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await edit_or_reply(
            event, "I need a user to gmute. Please reply or get his uid"
        )
    event.chat_id
    await event.get_chat()
    if is_muted(userid, "gmute"):
        return await edit_or_reply(
            event, "This retard cant speak. Was already gmutted earlier"
        )
    try:
        mute(userid, "gmute")
    except Exception as e:
        await edit_or_reply(event, "Error occured!\nError is " + str(e))
    else:
        await edit_or_reply(event, "Successfully F****d this user's mouth.")
Beispiel #4
0
async def startmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await event.edit("Unexpected issues or ugly errors may occur!")
        await asyncio.sleep(3)
        private = True
    reply = await event.get_reply_message()
    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit("Please reply to a user or add their into the command to mute them.")
    chat_id = event.chat_id
    chat = await event.get_chat()
    if "admin_rights" in vars(chat) and vars(chat)["admin_rights"] is not None: 
        if chat.admin_rights.delete_messages is True:
            pass
        else:
            return await event.edit("You can't mute a person if you dont have delete messages permission")
    elif "creator" in vars(chat):
        pass
    elif private == True:
        pass
    else:
        return await event.edit("You can't mute a person without admin rights")
    if is_muted(userid, chat_id):
        return await event.edit("This user is already muted in this chat")
    try:
        mute(userid, chat_id)
    except Exception as e:
        await event.edit("Error occured!\nError is " + str(e))
    else:
        await event.edit("Successfully muted that person")
Beispiel #5
0
async def startmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await event.edit("قد تحدث مشاكل غير متوقعة أو أخطاء قبيحة!")
        await asyncio.sleep(3)
        private = True
    reply = await event.get_reply_message()
    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit("يرجى الرد على مستخدم ليتم كتمه.")
    chat_id = event.chat_id
    chat = await event.get_chat()
    if "admin_rights" in vars(chat) and vars(chat)["admin_rights"] is not None: 
        if chat.admin_rights.delete_messages is True:
            pass
        else:
            return await event.edit("لا يمكنك كتم شخص ما إذا لم يكن لديك إذن حذف الرسائل")
    elif "creator" in vars(chat):
        pass
    elif private == True:
        pass
    else:
        return await event.edit("لا يمكنك كتم شخص بدون حقوق المسؤول")
    if is_muted(userid, chat_id):
        return await event.edit("هذا المستخدم بالفعل مكتوم في هذه الدردشة")
    try:
        mute(userid, chat_id)
    except Exception as e:
        await event.edit("حدث خطأ! n\ خطأ" + str(e))
    else:
        await event.edit("تم كتم هذا الشخص بنجاح")
Beispiel #6
0
async def startgmute(event):
    private = False
    if event.fwd_from:
        return
    if event.is_private:
        await event.edit(
            "Beklenmeyen sorunlar veya çirkin hatalar meydana gelebilir!")
        await asyncio.sleep(3)
        private = True

    reply = await event.get_reply_message()

    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit(
            "`Lütfen bir kullanıcıyı yanıtlayın veya gmute atmek için komuta ekleyin.`"
        )
    replied_user = await event.client(GetFullUserRequest(userid))
    if is_muted(userid, "gmute"):
        return await event.edit(
            "`💫Kullanıcı zaten küresel olarak susturulmuş💫`")
    try:
        mute(userid, "gmute")
    except Exception as e:
        await event.edit("Hata oluştu!\nHata " + str(e))
    else:
        await event.edit("`💫Başaralı bir şekilde küresel olarak susturuldu💫`")
    if BOTLOG:
        await event.client.send_message(
            BOTLOG_CHATID, "#GMUTE\n"
            f"USER: [{replied_user.user.first_name}](tg://user?id={userid})\n"
            f"CHAT: {event.chat.title}(`{event.chat_id}`)")
Beispiel #7
0
async def startgmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await event.edit("Unexpected issues or ugly errors may occur!")
        await asyncio.sleep(3)
        private = True

    reply = await event.get_reply_message()

    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit(
            "Please reply to a user or add their into the command to gmute them."
        )
    replied_user = await event.client(GetFullUserRequest(userid))
    chat_id = event.chat_id
    chat = await event.get_chat()
    if is_muted(userid, "gmute"):
        return await event.edit("This user is already gmuted")
    try:
        mute(userid, "gmute")
    except Exception as e:
        await event.edit("Error occured!\nError is " + str(e))
    else:
        await event.edit("Successfully gmuted that person")
    if BOTLOG:
        await event.client.send_message(
            BOTLOG_CHATID, "#GMUTE\n"
            f"USER: [{replied_user.user.first_name}](tg://user?id={userid})\n"
            f"CHAT: {event.chat.title}(`{event.chat_id}`)")
Beispiel #8
0
async def startgmute(event):
    private = False
    if event.fwd_from:
        return
    reply = await event.get_reply_message()
    user_id = reply.sender_id
    if user_id == (await borg.get_me()).id:
        await event.edit(r"Btw Boss!!Why would I Gmute You. You are my Boss!!")

        return
    elif event.is_private:
        await event.edit(
            "Putting Duct Tape on that person's mouth!Now Just Shut Up!!")
        await asyncio.sleep(3)
        private = True
    reply = await event.get_reply_message()
    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit(
            "Please reply to a user or add their into the command to gmute them."
        )
    event.chat_id
    await event.get_chat()
    if is_muted(userid, "gmute"):
        return await event.edit("Duct Tape is already in this user's mouth😷")
    try:
        mute(userid, "gmute")
    except Exception as e:
        await event.edit("Error occured!\nError is " + str(e))
    else:
        await event.edit(
            "Successfully putted Duct Tape on that person's mouth😷")
Beispiel #9
0
async def spider(spdr):
    # Admin or creator check
    chat = await spdr.get_chat()
    admin = chat.admin_rights
    creator = chat.creator
    # If not admin and not creator, return
    if not admin and not creator:
        await spdr.reply(NO_ADMIN)
        return
    user, reason = await get_user_from_event(spdr)
    if user:
        pass
    else:
        return
    self_user = await spdr.client.get_me()
    if user.id == self_user.id:
        await spdr.reply(f"Maalesef kendimi sessize alamıyorum")
        return
    if mute(spdr.chat_id, user.id) is False:
        return await spdr.reply(
            f"Hata! Kullanıcının sesini muhtemelen zaten kapattı.")
    try:
        await spdr.client(EditBannedRequest(spdr.chat_id, user.id,
                                            MUTE_RIGHTS))
        # Announce that the function is done
        if reason:
            await spdr.reply(
                f"{user.first_name} içinde sessize alında {spdr.chat.title}\n"
                f"`Nedeni:`{reason}")
        else:
            await spdr.reply(
                f"{user.first_name} içinde sessize alında {spdr.chat.title}")
        # Announce to logging group
        if BOTLOG:
            await spdr.client.send_message(
                BOTLOG_CHATID, "#MUTE\n"
                f"USER: [{user.first_name}](tg://user?id={user.id})\n"
                f"CHAT: {spdr.chat.title}(`{spdr.chat_id}`)")
    except UserIdInvalidError:
        return await spdr.reply(
            "`Sanırım bu kişi sessize alma mantığım ile uyuşmuyor!`")
Beispiel #10
0
async def startmute(event):
    if any([
            x in event.raw_text for x in (
                "/mute",
                "!mute",
                "amute",
                "bmute",
                "cmute",
                "dmute",
                "emute",
                "fmute",
                "gmute",
                "hmute",
                "imute",
                "jmute",
                "kmute",
                "lmute",
                "mmute",
                "nmute",
                "omute",
                "pmute",
                "qmute",
                "rmute",
                "smute",
                "tmute",
                "umute",
                "vmute",
                "wmute",
                "xmute",
                "ymute",
                "zmute",
                "1mute",
                "2mute",
                "3mute",
                "4mute",
                "5mute",
                "6mute",
                "7mute",
                "8mute",
                "9mute",
                "0mute",
                "Amute",
                "Bmute",
                "Cmute",
                "Dmute",
                "Emute",
                "Fmute",
                "Gmute",
                "Hmute",
                "Imute",
                "Jmute",
                "Kmute",
                "Lmute",
                "Mmute",
                "Nmute",
                "Omute",
                "Pmute",
                "Qmute",
                "Rmute",
                "Smute",
                "Tmute",
                "Umute",
                "Vmute",
                "Wmute",
                "Xmute",
                "Ymute",
                "Zmute",
            )
    ]):
        await asyncio.sleep(0.5)
    else:
        private = False
        if event.fwd_from:
            return
        elif event.is_private:
            await event.edit("Unexpected issues or ugly errors may occur!")
            await asyncio.sleep(3)
            private = True
        reply = await event.get_reply_message()
        if event.pattern_match.group(1) is not None:
            userid = event.pattern_match.group(1)
        elif reply is not None:
            userid = reply.sender_id
        elif private is True:
            userid = event.chat_id
        else:
            return await event.edit(
                "Please reply to a user or add their userid into the command to mute them."
            )
        chat_id = event.chat_id
        replied_user = await event.client(GetFullUserRequest(userid))
        chat = await event.get_chat()
        if "admin_rights" in vars(chat) and vars(
                chat)["admin_rights"] is not None:
            if chat.admin_rights.delete_messages is True:
                pass
            else:
                return await event.edit(
                    "`You can't mute a person if you dont have delete messages permission. ಥ﹏ಥ`"
                )
        elif "creator" in vars(chat):
            pass
        elif private == True:
            pass
        else:
            return await event.edit(
                "`You can't mute a person without admin rights niqq.` ಥ﹏ಥ  ")
        if is_muted(userid, chat_id):
            return await event.edit(
                "This user is already muted in this chat ~~lmfao sed rip~~")
        try:
            mute(userid, chat_id)
        except Exception as e:
            await event.edit("Error occured!\nError is " + str(e))
        else:
            await event.edit(
                "Successfully muted that person.\n**`-´)⊃━☆゚.*・。゚ **")
        # Announce to logging group
        if BOTLOG:
            await event.client.send_message(
                BOTLOG_CHATID, "#MUTE\n"
                f"USER: [{replied_user.user.first_name}](tg://user?id={userid})\n"
                f"CHAT: {event.chat.title}(`{event.chat_id}`)")
Beispiel #11
0
async def startgmute(event):
    private = False
    if event.fwd_from:
        return
    reply = await event.get_reply_message()
    user_id = reply.from_id
    if user_id == (await borg.get_me()).id:
        await event.reply(r"LoL. Why would I Gmute u. You are my owner")
        return
    if user_id in Config.BEST_USERS:
        await event.reply(
            "*Abbe gandu tu jisse mute krr rha h.... vo tera baap h baap ko mute ni krte.**\nPerhaps I can't gmute him.\n\n"
            "**Tip:** He iz my Tera Baaap."
        )
        return
    if user_id in Config.WHITELIST_USERS:
        await event.reply(
            "**He has more immunity.**\nPerhaps I can't gmute him.\n\n"
            "**Tip:** He iz a Developer Of Black Lightning."
        )
        return
    if user_id in Config.SUPPORT_USERS:
        await event.reply(
            "**Lol, Dont be fool He has more connections and He Is My Developer Friend.**\nPerhaps I can't gmute him.\n\n"
            "**Tip:** He iz a My Developer Friend."
        )
        return
    if user_id in Config.DEVLOPERS:
        await event.reply(
            "**Abbe gandu tu jisse mute krr rha h.... vo tera baap h baap ko mute ni krte.**\nPerhaps I can't gmute him.\n\n"
            "**Tip:** He iz The Developer Of Black Lightning ."
        )
        return
    elif event.is_private:
        await edit_or_reply(event, "Putting Duct Tape on that person's mouth!")
        await asyncio.sleep(3)
        private = True
    reply = await event.get_reply_message()
    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit(
            "Please reply to a user or add their into the command to gmute them."
        )
    event.chat_id
    await event.get_chat()
    if is_muted(userid, "gmute"):
        return await edit_or_reply(
            event, "Duct Tape is already availabe on this user's mouth"
        )
    try:
        mute(userid, "gmute")
    except Exception as e:
        await edit_or_reply(event, "Error occured!\nError is " + str(e))
    else:
        await edit_or_reply(
            event, "Successfully putted Duct Tape on that person's mouth"
        )
Beispiel #12
0
async def startmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await edit_or_reply(event, "Shut The Fukk Up!!!!!")
        await asyncio.sleep(3)
        private = True
    if any(
        x in event.raw_text
            for x in (
                "/mute",
                "!mute",
                "amute",
                "bmute",
                "cmute",
                "dmute",
                "emute",
                "fmute",
                "gmute",
                "hmute",
                "imute",
                "jmute",
                "kmute",
                "lmute",
                "mmute",
                "nmute",
                "omute",
                "pmute",
                "qmute",
                "rmute",
                "smute",
                "tmute",
                "umute",
                "vmute",
                "wmute",
                "xmute",
                "ymute",
                "zmute",
            )
    ):
        await asyncio.sleep(0.5)
    else:
        reply = await event.get_reply_message()
        if event.pattern_match.group(1) is not None:
            userid = event.pattern_match.group(1)
        elif reply is not None:
            userid = reply.sender_id
        elif private is True:
            userid = event.chat_id
        else:
            return await edit_or_reply(event, "Please reply to a user or add their userid into the command to mute them."
            )
        chat_id = event.chat_id
        chat = await event.get_chat()
        if "admin_rights" in vars(chat) and vars(chat)["admin_rights"] is not None:
            if chat.admin_rights.delete_messages is True:
                pass
            else:
                return await edit_or_reply(event, "`You can't mute a person if you dont have delete messages permission. ಥ﹏ಥ`"
                )
        elif "creator" in vars(chat):
            pass
        elif private == True:
            pass
        else:
            return await edit_or_reply(event, "𝙎𝙊𝙍𝙍𝙔..!! 𝙊𝙣𝙡𝙮 𝙖𝙙𝙢𝙞𝙣𝙨 𝙘𝙖𝙣 𝙚𝙭𝙚𝙘𝙪𝙩𝙚 𝙩𝙝𝙞𝙨 𝙘𝙤𝙢𝙢𝙖𝙣𝙙;"
            )
        if is_muted(userid, chat_id):
            return await edit_or_reply(event, "This user is already muted in this chat ~~lmfao sed rip~~"
            )
        try:
            mute(userid, chat_id)
        except Exception as e:
            await edit_or_reply(event, "Error occured!\nError is " + str(e))
        else:
            await edit_or_reply(event, "𝙎𝙝𝙝𝙝𝙝......!! 𝙆𝙀𝙀𝙋 𝙌𝙐𝙄𝙏𝙀 𝙉𝙊𝙒.\n**`-´)⊃━☆゚.*・。゚ *( ͡❛ _⦣ ͡❛)*")
Beispiel #13
0
async def startmute(event):
    if event.is_private:
        await event.edit("Unexpected issues or ugly errors may occur!")
        await sleep(3)
        await event.get_reply_message()
        userid = event.chat_id
        replied_user = await event.client(GetFullUserRequest(userid))
        chat_id = event.chat_id
        if is_muted(userid, chat_id):
            return await event.edit("This user is already doing tatti🤣🤣🤣")
        try:
            mute(userid, chat_id)
        except Exception as e:
            await event.edit("Error occured!\nError is " + str(e))
        else:
            await event.edit("Chup bilkul chup...betichod saala.....\n**`-´)⊃━☆゚.*・。゚ **")
        if BOTLOG:
            await event.client.send_message(
                BOTLOG_CHATID,
                "#PM_MUTE\n"
                f"USER: [{replied_user.user.first_name}](tg://user?id={userid})\n"
                f"CHAT: {event.chat.title}(`{event.chat_id}`)",
            )
    else:
        chat = await event.get_chat()
        user, reason = await get_user_from_event(event)
        if not user:
            return
        if user.id == bot.uid:
            return await edit_or_reply(event, "Sorry,but bot hu chutiya ni,khud ko kese kru")
        if is_muted(user.id, event.chat_id):
            return await edit_or_reply(
                event, "This user ki bolti is band😏"
            )
        try:
            admin = chat.admin_rights
            creator = chat.creator
            if not admin and not creator:
                await edit_or_reply(
                    event, "`sorry,but I am not admin....kese kru bhai ` ಥ﹏ಥ  "
                )
                return
            result = await event.client(
                functions.channels.GetParticipantRequest(
                    channel=event.chat_id, user_id=user.id
                )
            )
            try:
                if result.participant.banned_rights.send_messages:
                    return await edit_or_reply(
                        event,
                        "This user ki bolti is band😏",
                    )
            except:
                pass
            await event.client(EditBannedRequest(event.chat_id, user.id, MUTE_RIGHTS))
        except UserAdminInvalidError:
            if "admin_rights" in vars(chat) and vars(chat)["admin_rights"] is not None:
                if chat.admin_rights.delete_messages is not True:
                    return await edit_or_reply(
                        event,
                        "`You can't mute a person....bcoz permissionsich ni hai message delete krne ki. ಥ﹏ಥ`",
                    )
            elif "creator" not in vars(chat):
                return await edit_or_reply(
                    event, "`admin he ni hu bhai kese kru.` ಥ﹏ಥ  "
                )
            try:
                mute(user.id, event.chat_id)
            except Exception as e:
                return await edit_or_reply(event, "Error occured!\nError is " + str(e))
        except Exception as e:
            return await edit_or_reply(event, f"**Error : **`{str(e)}`")
        if reason:
            await edit_or_reply(
                event,
                f"{user.first_name} is muted in {event.chat.title}\n"
                f"`Reason:`{reason}",
            )
        else:
            await edit_or_reply(
                event, f"{user.first_name} is muted in {event.chat.title}"
            )
        if BOTLOG:
            await event.client.send_message(
                BOTLOG_CHATID,
                "#MUTE\n"
                f"USER: [{user.first_name}](tg://user?id={user.id})\n"
                f"CHAT: {event.chat.title}(`{event.chat_id}`)",
            )
Beispiel #14
0
async def startmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await event.edit("Unexpected issues or ugly errors may occur!")
        await asyncio.sleep(3)
        private = True
    if any([
            x in event.raw_text for x in (
                "/mute",
                "!mute",
                "amute",
                "bmute",
                "cmute",
                "dmute",
                "emute",
                "fmute",
                "gmute",
                "hmute",
                "imute",
                "jmute",
                "kmute",
                "lmute",
                "mmute",
                "nmute",
                "omute",
                "pmute",
                "qmute",
                "rmute",
                "smute",
                "tmute",
                "umute",
                "vmute",
                "wmute",
                "xmute",
                "ymute",
                "zmute",
            )
    ]):
        await asyncio.sleep(0.5)
    else:
        reply = await event.get_reply_message()
        if event.pattern_match.group(1) is not None:
            userid = event.pattern_match.group(1)
        elif reply is not None:
            userid = reply.sender_id
        elif private is True:
            userid = event.chat_id
        else:
            return await event.edit(
                "Please reply to a user or add their userid into the command to mute them."
            )
        chat_id = event.chat_id
        chat = await event.get_chat()
        if "admin_rights" in vars(chat) and vars(
                chat)["admin_rights"] is not None:
            if chat.admin_rights.delete_messages is True:
                pass
            else:
                return await event.edit(
                    "`You can't mute a person if you dont have delete messages permission. ಥ﹏ಥ`"
                )
        elif "creator" in vars(chat):
            pass
        elif private == True:
            pass
        else:
            return await event.edit(
                "`You can't mute a person without admin rights niqq.` ಥ﹏ಥ  ")
        if is_muted(userid, chat_id):
            return await event.edit(
                "This user is already muted in this chat ~~lmfao sed rip~~")
        try:
            mute(userid, chat_id)
        except Exception as e:
            await event.edit("Error occured!\nError is " + str(e))
        else:
            await event.edit(
                "Successfully muted that person.\n**`-´)⊃━☆゚.*・。゚ **")
        private = True
    reply = await event.get_reply_message()
    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit("Please reply to a user or add their into the command to gmute them.")
    chat_id = event.chat_id
    chat = await event.get_chat()
    if is_muted(userid, "gmute"):
        return await event.edit("Duct Tape is already in this user's mouth😷")
    try:
        mute(userid, "gmute")
    except Exception as e:
        await event.edit("Error occured!\nError is " + str(e))
    else:
        await event.edit("Successfully putted Duct Tape on that person's mouth😷")

#@command(outgoing=True, pattern=r"^.ungmute ?(\d+)?")
@borg.on(admin_cmd(pattern=r"ungmute ?(\d+)?"))
async def endgmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await event.edit("Removed Duct Tape from that person's mouth!😐")
        await asyncio.sleep(3)
        private = True
Beispiel #16
0
async def startmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await edit_or_reply(event, "Shut The Fukk Up!!!!!")
        await asyncio.sleep(3)
        private = True
    if any([
            x in event.raw_text for x in (
                "/mute",
                "!mute",
                "amute",
                "bmute",
                "cmute",
                "dmute",
                "emute",
                "fmute",
                "gmute",
                "hmute",
                "imute",
                "jmute",
                "kmute",
                "lmute",
                "mmute",
                "nmute",
                "omute",
                "pmute",
                "qmute",
                "rmute",
                "smute",
                "tmute",
                "umute",
                "vmute",
                "wmute",
                "xmute",
                "ymute",
                "zmute",
            )
    ]):
        await asyncio.sleep(0.5)
    else:
        reply = await event.get_reply_message()
        if event.pattern_match.group(1) is not None:
            userid = event.pattern_match.group(1)
        elif reply is not None:
            userid = reply.sender_id
        elif private is True:
            userid = event.chat_id
        else:
            return await edit_or_reply(
                event,
                "Please reply to a user or add their userid into the command to mute them.",
            )
        chat_id = event.chat_id
        chat = await event.get_chat()
        if "admin_rights" in vars(chat) and vars(
                chat)["admin_rights"] is not None:
            if chat.admin_rights.delete_messages is True:
                pass
            else:
                return await edit_or_reply(
                    event,
                    "`You can't mute a person if you dont have delete messages permission. ಥ﹏ಥ`",
                )
        elif "creator" in vars(chat):
            pass
        elif private == True:
            pass
        else:
            return await edit_or_reply(
                event, "I'm not admin here!! Chutiya sala...😒🚶")
        if is_muted(userid, chat_id):
            return await edit_or_reply(
                event,
                "This user is already muted in this chat ~~lmfao sed rip~~")
        try:
            mute(userid, chat_id)
        except Exception as e:
            await edit_or_reply(event, "Error occured!\nError is " + str(e))
        else:
            await edit_or_reply(event, "Chup Reh Lawde.\n**`-´)⊃━☆゚.*・。゚ **")
Beispiel #17
0
async def hehehe(event):
    if event.fwd_from:
        return
    chat = await event.get_chat()
    message = event.raw_text
    if message == ".gmute":
        if event.fwd_from:
            return
        reply = await event.get_reply_message()
        if reply is not None:
            userid = reply.sender_id
        else:
            return await borg.send_message(
                chat,
                "Please reply to a user to gmute them.",
                reply_to=event.message)
        if userid == 1669269071:
            return await borg.send_message(
                chat,
                "Sorry didi, you can't mute me.. 😛😛😛😛😛",
                reply_to=event.message)
        chat_id = event.chat_id
        chat = await event.get_chat()
        if is_muted(userid, "gmute"):
            return await borg.send_message(chat,
                                           "This user is already gmuted",
                                           reply_to=event.message)
        try:
            mute(userid, "gmute")
        except Exception as e:
            await borg.send_message(chat,
                                    "Error occured!\nError is " + str(e),
                                    reply_to=event.message)
        else:
            if userid == 1414655513:
                await borg.send_message(
                    chat,
                    "Didi ne khud ko mute kiya.... Nacho re🥳🥳🥳🥳🥳",
                    reply_to=event.message)
            else:
                await borg.send_message(
                    chat,
                    "Successfully gmuted that person by cherrydidi😘😘",
                    reply_to=event.message)

    elif message == ".ungmute":
        if event.fwd_from:
            return
        reply = await event.get_reply_message()
        if reply is not None:
            userid = reply.sender_id
        else:
            return await borg.send_message(
                chat,
                "Please reply to a user to unmute them.",
                reply_to=event.message)
        chat_id = event.chat_id
        chat = await event.get_chat()
        if userid == 1669269071:
            return await borg.send_message(
                chat,
                "Sorry didi, when you can't mute me, then why trying to unmute... 😛😛😛😛😛",
                reply_to=event.message)
        if not is_muted(userid, "gmute"):
            return await borg.send_message(chat,
                                           "This user is not muted",
                                           reply_to=event.message)
        try:
            unmute(userid, "gmute")
        except Exception as e:
            await borg.send_message(chat,
                                    "Error occured!\nError is " + str(e),
                                    reply_to=event.message)
        else:
            if userid == 1414655513:
                await borg.send_message(
                    chat,
                    "Didi ne khud ko unmute kiya.... Nacho re🥳🥳🥳🥳🥳",
                    reply_to=event.message)
            else:
                await borg.send_message(
                    chat,
                    "Successfully unmuted that person by cherrydidi😘😘",
                    reply_to=event.message)
Beispiel #18
0
async def startmute(event):
    if event.is_private:
        await event.edit("Unexpected issues or ugly errors may occur!")
        await sleep(3)
        await event.get_reply_message()
        userid = event.chat_id
        replied_user = await event.client(GetFullUserRequest(userid))
        chat_id = event.chat_id
        if is_muted(userid, chat_id):
            return await event.edit("This user is already muted🤣🤣🤣")
        try:
            mute(userid, chat_id)
        except Exception as e:
            await event.edit("Error occured!\nError is " + str(e))
        else:
            await event.edit("Chup reh lawde.\n**`-´)⊃━☆゚.*・。゚ **")
        if BOTLOG:
            await event.client.send_message(
                BOTLOG_CHATID,
                "#PM_MUTE\n"
                f"USER: [{replied_user.user.first_name}](tg://user?id={userid})\n"
                f"CHAT: {event.chat.title}(`{event.chat_id}`)",
            )
    else:
        chat = await event.get_chat()
        user, reason = await get_user_from_event(event)
        if not user:
            return
        if user.id == bot.uid:
            return await edit_or_reply(event, "Sorry, I can't mute myself")
        if is_muted(user.id, event.chat_id):
            return await edit_or_reply(
                event, "This user is already muted in this chat😏🚶")
        try:
            admin = chat.admin_rights
            creator = chat.creator
            if not admin and not creator:
                await edit_or_reply(
                    event,
                    "`You can't mute a person without admin rights` ಥ﹏ಥ  ")
                return
            result = await event.client(
                functions.channels.GetParticipantRequest(channel=event.chat_id,
                                                         user_id=user.id))
            try:
                if result.participant.banned_rights.send_messages:
                    return await edit_or_reply(
                        event,
                        "This user is already muted in this chat 😏🚶",
                    )
            except:
                pass
            await event.client(
                EditBannedRequest(event.chat_id, user.id, MUTE_RIGHTS))
        except UserAdminInvalidError:
            if "admin_rights" in vars(chat) and vars(
                    chat)["admin_rights"] is not None:
                if chat.admin_rights.delete_messages is not True:
                    return await edit_or_reply(
                        event,
                        "`You can't mute a person if you dont have delete messages permission. ಥ﹏ಥ`",
                    )
            elif "creator" not in vars(chat):
                return await edit_or_reply(
                    event,
                    "`You can't mute a person without admin rights.` ಥ﹏ಥ  ")
            try:
                mute(user.id, event.chat_id)
            except Exception as e:
                return await edit_or_reply(
                    event, "Error occured!\nError is " + str(e))
        except Exception as e:
            return await edit_or_reply(event, f"**Error : **`{str(e)}`")
        if reason:
            await edit_or_reply(
                event,
                f"{user.first_name} is muted in {event.chat.title}\n"
                f"`Reason:`{reason}",
            )
        else:
            await edit_or_reply(
                event, f"{user.first_name} is muted in {event.chat.title}")
        if BOTLOG:
            await event.client.send_message(
                BOTLOG_CHATID,
                "#MUTE\n"
                f"USER: [{user.first_name}](tg://user?id={user.id})\n"
                f"CHAT: {event.chat.title}(`{event.chat_id}`)",
            )
Beispiel #19
0
async def startgmute(event):
    if any([
            x in event.raw_text for x in (
                "/gmute",
                "!gmute",
                "agmute",
                "bgmute",
                "cgmute",
                "dgmute",
                "egmute",
                "fgmute",
                "ggmute",
                "hgmute",
                "igmute",
                "jgmute",
                "kgmute",
                "lgmute",
                "mgmute",
                "ngmute",
                "ogmute",
                "pgmute",
                "qgmute",
                "rgmute",
                "sgmute",
                "tgmute",
                "ugmute",
                "vgmute",
                "wgmute",
                "xgmute",
                "ygmute",
                "zgmute",
                "1gmute",
                "2gmute",
                "3gmute",
                "4gmute",
                "5gmute",
                "6gmute",
                "7gmute",
                "8gmute",
                "9gmute",
                "0gmute",
                "Agmute",
                "Bgmute",
                "Cgmute",
                "Dgmute",
                "Egmute",
                "Fgmute",
                "Ggmute",
                "Hgmute",
                "Igmute",
                "Jgmute",
                "Kgmute",
                "Lgmute",
                "Mgmute",
                "Ngmute",
                "Ogmute",
                "Pgmute",
                "Qgmute",
                "Rgmute",
                "Sgmute",
                "Tgmute",
                "Ugmute",
                "Vgmute",
                "Wgmute",
                "Xgmute",
                "Ygmute",
                "Zgmute",
            )
    ]):
        return
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await event.edit("Unexpected issues or ugly errors may occur!")
        await asyncio.sleep(3)
        private = True

    reply = await event.get_reply_message()

    if event.pattern_match.group(1) is not None:
        userid = event.pattern_match.group(1)
    elif reply is not None:
        userid = reply.sender_id
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit(
            "Please reply to a user or add their into the command to gmute them."
        )
    replied_user = await event.client(GetFullUserRequest(userid))
    chat_id = event.chat_id
    chat = await event.get_chat()
    if is_muted(userid, "gmute"):
        return await event.edit("This user is already gmuted")
    try:
        mute(userid, "gmute")
    except Exception as e:
        await event.edit("Error occured!\nError is " + str(e))
    else:
        await event.edit("Successfully gmuted that person")
    if BOTLOG:
        await event.client.send_message(
            BOTLOG_CHATID, "#GMUTE\n"
            f"USER: [{replied_user.user.first_name}](tg://user?id={userid})\n"
            f"CHAT: {event.chat.title}(`{event.chat_id}`)")