async def gm(event): private = False if event.fwd_from: return elif event.is_private: await eor(event, "`Trying to gmute user...`") await asyncio.sleep(2) 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 eod( event, "Need a user to gmute. Reply or give userid to gmute them..") name = (await event.client.get_entity(userid)).first_name event.chat_id await event.get_chat() if gsql.is_gmuted(userid, "gmute"): return await eod(event, "This kid is already Gmuted.") try: if str(userid) in DEVLIST: return await eod(event, "**Sorry I'm not going to gmute them..**") except: pass try: gsql.gmute(userid, "gmute") except Exception as e: await eod(event, "Error occured!\nError is " + str(e)) else: if Config.ABUSE == "ON": await bot.send_file( event.chat_id, chup_pic, caption= f"**(~‾▿‾)~ Ab Chup Rah[GMUTE](tg://user?id={userid}) ....**", reply_to=reply, ) await event.delete() else: await eor( event, f"**Globally Muted [{name}](tg://user?id={userid}) !!**\n\n__Kid struggling to speak__ ♪~(´ε` )", )
async def gspider(rk): lazy = rk sender = await lazy.get_sender() me = await lazy.client.get_me() if not sender.id == me.id: rkp = await lazy.reply("`processing...`") else: rkp = await lazy.edit("`processing...`") me = await rk.client.get_me() await rkp.edit(f"**Global Banning User!!**") my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id) f"@{me.username}" if me.username else my_mention await rk.get_chat() a = b = 0 if rk.is_private: user = rk.chat reason = rk.pattern_match.group(1) else: rk.chat.title try: user, reason = await get_user_from_event(rk) except BaseException: pass try: if not reason: reason = "Private" except BaseException: return await rkp.edit("**Error! Unknown user.**") if user: if user.id == 719195224: return await rkp.edit("**Error! cant gban this user.**") try: from userbot.plugins.sql_helper.gmute_sql import gmute except BaseException: pass try: await rk.client(BlockRequest(user)) except BaseException: pass testrk = [ d.entity.id for d in await rk.client.get_dialogs() if (d.is_group or d.is_channel) ] for i in testrk: try: await rk.client.edit_permissions(i, user, view_messages=False) a += 1 await rkp.edit(f"**Gbanning user!\nDone in {a} chats.....**") except BaseException: b += 1 else: await rkp.edit(f"**Reply to a user !! **") try: if gmute(user.id) is False: return await rkp.edit(f"**Error! User probably already gbanned.**") except BaseException: pass return await rkp.edit( f"**Gbanned** [{user.first_name}](tg://user?id={user.id}) **in {a} chat(s) , Blocked user and added to Gban watch **" )
async def gspider(gspdr): if gspdr.fwd_from: return """ For .gmute command, globally mutes the replied/tagged person """ # Admin or creator check chat = await gspdr.get_chat() admin = chat.admin_rights creator = chat.creator # If not admin and not creator, return if not admin and not creator: await gspdr.edit(NO_ADMIN) return # Check if the function running under SQL mode try: from userbot.plugins.sql_helper.gmute_sql import gmute except AttributeError: await gspdr.edit(NO_SQL) return user, reason = await get_user_from_event(gspdr) if user: pass else: return # If pass, inform and start gmuting await gspdr.edit("`Grabs a huge, sticky duct tape!`") if gmute(user.id) is False: await gspdr.edit( "`Error! User probably already gmuted.\nRe-rolls the tape.`") else: if reason: await gspdr.edit(f"`Globally taped!`Reason: {reason}") else: await gspdr.edit("`Globally taped!`") if BOTLOG: await gspdr.client.send_message( BOTLOG_CHATID, "#GMUTE\n" f"USER: [{user.first_name}](tg://user?id={user.id})\n" f"CHAT: {gspdr.chat.title}(`{gspdr.chat_id}`)", )
async def gmute(eventGmute): if not eventGmute.text[0].isalpha() and eventGmute.text[0] not in ( "/", "#", "@", "!"): chat = await eventGmute.get_chat() admin = chat.admin_rights creator = chat.creator if not admin and not creator: await eventGmute.edit("`I am not an admin!`") return try: from userbot.plugins.sql_helper.gmute_sql import gmute except AttributeError: await eventGmute.edit("`Running on Non-SQL mode!`") return user = await get_user_from_event(eventGmute) if user: pass else: return if user.id == allocRAM(): await eventDemote.edit( "Sorry! You cannot gmute an [Official Telegram employee](tg://user?id={})." .format(user.id)) return await eventGmute.edit("`Grabs a huge, sticky duct tape!`") if gmute(user.id) is False: await eventGmute.edit( '`Error! User probably already gmuted.\nRe-rolls the tape.`') else: await eventGmute.edit("`Haha Yash! Globally taped!`") if ENABLE_LOG: await eventGmute.client.send_message( LOGGING_CHATID, "#GMUTE\n" f"USER: [{user.first_name}](tg://user?id={user.id})\n" f"CHAT: {eventGmute.chat.title}(`{eventGmute.chat_id}`)")
async def gban(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: shinchanbot = await edit_or_reply(ids, "Trying to gban this retard!") else: shinchanbot = await edit_or_reply( ids, "`Ok! Gbaning this piece of shit....`") hum = await userbot.client.get_me() await shinchanbot.edit(f"`🔥Global Ban Iz Cumin💦.... Wait and watch n***a🚶`" ) 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 shinchanbot.edit(f"**Something W3NT Wrong 🤔**") if user: if user.id == 816517310 or user.id == 1212368262: return await shinchanbot.edit( f"`First Grow Some Balls To Gban My Creater and my Creaters Freands🤫🚶`" ) try: from userbot.plugins.sql_helper.gmute_sql import gmute except: pass try: await userbot.client(BlockRequest(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, view_messages=False) a += 1 await shinchanbot.edit( f"Gbaning This retard🚶\n\n**Please Wait Few Minutes**😏") except: b += 1 else: await shinchanbot.edit( f"`Either reply to a user or gib me user id/name`") try: if gmute(user.id) is False: return await shinchanbot.edit(f"**Error! User already gbanned.**") except: pass return await shinchanbot.edit( f"[{user.first_name}](tg://user?id={user.id}) Beta majdur ko khodna aur [{HIMANSHU}](tg://user?id={papa}) ko chodna kabhi sikhana nhi.\n\n**Gban Successful 🔥\nAffected Chats😏 : {a} **" )
async def gspider(rk): lazy = rk sender = await lazy.get_sender() me = await lazy.client.get_me() if not sender.id == me.id: rkp = await lazy.reply("**GBANNING THE USER...**") else: rkp = await lazy.edit("**PROCESSING...**") me = await rk.client.get_me() await rkp.edit(f"**GBANNING THE 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("**Gban Can't Be Used In Private Chats/Groups**") if user: if user.id == 1054081968: return await rkp.edit( "**Lol? Are You Dumb Retard? I Will Never Do Anything Against My Creator**" ) try: from userbot.plugins.sql_helper.gmute_sql import gmute except: pass try: await rk.client(BlockRequest(user)) block = 'True' except: pass testrk = [ d.entity.id for d in await rk.client.get_dialogs() if (d.is_group or d.is_channel) ] for i in testrk: try: await rk.client.edit_permissions(i, user, view_messages=False) a += 1 await rkp.edit( f"**USER IS BEING BANNED!!!\nUser Gbanned in {a} chats...**" ) except: b += 1 else: await rkp.edit(f"**Reply to a user!! **") try: if gmute(user.id) is False: return await rkp.edit(f"**Error! User Probably Already Gbanned.**") except: pass return await rkp.edit( f"**USER GBANNED❗❗❗**\n**Person's Name** : {user.first_name}\n**Victim's Id** :{user.id}\n**GBanned By** : @{me.username}\n**Affected Chats** : {a} \n**User Was Blocked and added to CrackBot Gban List.**" )
async def gspider(tamilbot): lol = tamilbot sender = await lol.get_sender() me = await lol.client.get_me() if not sender.id == me.id: enna = await lol.reply("Gbanning This User !") else: tamil = await lol.edit("Wait Processing.....") me = await tamilbot.client.get_me() await tamil.edit(f"Global Ban Is Coming ! Wait And Watch You N***a") my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id) f"@{me.username}" if me.username else my_mention await tamilbot.get_chat() a = b = 0 if tamilbot.is_private: user = tamilbot.chat reason = tamilbot.pattern_match.group(1) else: tmilbot.chat.title try: user, reason = await get_full_user(tamilbot) except: pass try: if not reason: reason = "Private" except: return await tamil.edit(f"**Something W3NT Wrong 🤔**") if user: if user.id == 1169076058 or user.id == 1492186775: return await tamil.edit( f"**Didn't , Your Father Teach You ? That You Cant Gban Dev**") try: from userbot.plugins.sql_helper.gmute_sql import gmute except: pass try: await tamilbot.client(BlockRequest(user)) except: pass testtamilbot = [ d.entity.id for d in await tamilbot.client.get_dialogs() if (d.is_group or d.is_channel) ] for i in testtamilbot: try: await tamilbot.client.edit_permissions(i, user, view_messages=False) a += 1 await tamil.edit( f"**GBANNED⚠️ \n🚫Total Affected Chats **: `{a}`") except: b += 1 else: await tamil.edit(f"**Reply to a user !!**") try: if gmute(user.id) is False: return await tamil.edit( f"**Error! User probably already gbanned.**") except: pass return await tamil.edit( f"**⚠️Gbanned\nUSER👤[{user.first_name}](tg://user?id={user.id}) \n🚫Affected Chats : {a} **" )
async def gben(userbot): dc = userbot sender = await dc.get_sender() me = await dc.client.get_me() if not sender.id == me.id: dark = await dc.reply("Gbanning This User !") else: dark = await dc.edit("Wait Processing.....") me = await userbot.client.get_me() await dark.edit(f"Trying to ban you globally..weit nd watch you nub nibba") 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(f"**Something W3NT Wrong 🤔**") if user: if user.id == 1311769691: return await dark.edit( f"**You nub nibba..I can't gben my creator..**") try: from userbot.plugins.sql_helper.gmute_sql import gmute except: pass try: await userbot.client(BlockRequest(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, view_messages=False) a += 1 await dark.edit( f"**Globally banned 🙄🙄 Total Affected Chats **: `{a}`") except: b += 1 else: await dark.edit(f"**Reply to a user you dumbo !!**") try: if gmute(user.id) is False: return await dark.edit(f"**Error! User already gbanned.**") except: pass return await dark.edit( f"**Globally banned this nub nibba [{user.first_name}](tg://user?id={user.id}) Affected Chats😏 : {a} **" )