"""XKCD Search Syntax: .xkcd <search>""" from urllib.parse import quote import requests from uniborg.util import edit_or_reply, WhiteEye_on_cmd, sudo_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="xkcd ?(.*)")) @WhiteEye.on(sudo_cmd(pattern="xkcd ?(.*)", allow_sudo=True)) async def _(event): livinglegend = await edit_or_reply(event, "Oh SeD Pls Wait") if event.fwd_from: return input_str = event.pattern_match.group(1) xkcd_id = None if input_str: if input_str.isdigit(): xkcd_id = input_str else: xkcd_search_url = "https://relevantxkcd.appspot.com/process?" queryresult = requests.get( xkcd_search_url, params={"action": "xkcd", "query": quote(input_str)} ).text xkcd_id = queryresult.split(" ")[2].lstrip("\n") if xkcd_id is None: xkcd_url = "https://xkcd.com/info.0.json" else: xkcd_url = "https://xkcd.com/{}/info.0.json".format(xkcd_id) r = requests.get(xkcd_url) if r.ok:
"chucks", "hurls", ] HIT = [ "hits", "whacks", "slaps", "smacks", "bashes", ] DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "WhiteEyeUserBot" @WhiteEye.on(WhiteEye_on_cmd(pattern="slap ?(.*)", allow_sudo=True)) async def who(event): if event.fwd_from: return replied_user = await get_user(event) caption = await slap(replied_user, event) message_id_to_reply = event.message.reply_to_msg_id if not message_id_to_reply: message_id_to_reply = None try: await event.edit(caption) except: await event.edit("`Can't slap this nibba !!`")
RUNSREACTS = [ "`Congratulations and BRAVO!`", "`You did it! So proud of you!`", "`This calls for celebrating! Congratulations!`", "`I knew it was only a matter of time. Well done!`", "`Congratulations on your well-deserved success.`", "`Heartfelt congratulations to you.`", "`Warmest congratulations on your achievement.`", "`Congratulations and best wishes for your next adventure!”`", "`So pleased to see you accomplishing great things.`", "`Feeling so much joy for you today. What an impressive achievement!`", ] @WhiteEye.on(WhiteEye_on_cmd(pattern="congo")) @WhiteEye.on(sudo_cmd(pattern="congo", allow_sudo=True)) async def _(event): if event.fwd_from: return bro = random.randint(0, len(RUNSREACTS) - 1) reply_text = RUNSREACTS[bro] await edit_or_reply(event, reply_text) CMD_HELP.update( { "congratulations": "**Congratulations**\ \n\n**Syntax : **`.congo`\ \n**Usage :** This plugin is used to congratulate someone." }
from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd("sg ?(.*)")) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: await event.edit("```Reply to any user message.```") return reply_message = await event.get_reply_message() if not reply_message.text: await event.edit("```reply to text message```") return chat = "@SangMataInfo_bot" reply_message.sender if reply_message.sender.bot: await event.edit("```Reply to actual users message.```") return await event.edit("```Processing```") async with borg.conversation(chat) as conv: try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=461843263) ) # await borg.forward_messages(chat, reply_message) await silently_send_message(chat, "/generate") response = await response except YouBlockedUserError:
"口", "尸", "㔿", "尺", "丂", "丅", "凵", "リ", "山", "乂", "丫", "乙", ] @WhiteEye.on(WhiteEye_on_cmd(pattern="weeb ?(.*)")) async def weebify(event): args = event.pattern_match.group(1) if not args: get = await event.get_reply_message() args = get.text if not args: await event.edit("`What I am Supposed to Weebify U Dumb`") return string = " ".join(args).lower() for normiecharacter in string: if normiecharacter in normiefont: weebycharacter = weebyfont[normiefont.index(normiecharacter)] string = string.replace(normiecharacter, weebycharacter) await event.edit(string)
"""WikiMedia.ORG Syntax: .wikimedia Query""" import requests from uniborg.util import edit_or_reply, WhiteEye_on_cmd, sudo_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="wikimedia (.*)")) @WhiteEye.on(sudo_cmd(pattern="wikimedia (.*)", allow_sudo=True)) async def _(event): wowsosmart = await edit_or_reply(event, "Wait Finding This Bleeding Media xD") if event.fwd_from: return input_str = event.pattern_match.group(1) url = "https://commons.wikimedia.org/w/api.php?action={}&generator={}&prop=imageinfo&gimlimit={}&redirects=1&titles={}&iiprop={}&format={}".format( "query", "images", "5", input_str, "timestamp|user|url|mime|thumbmime|mediatype", "json", ) r = requests.get(url).json() result = "" results = r["query"]["pages"] for key in results: current_value = results[key] pageid = current_value["pageid"] title = current_value["title"] imageinfo = current_value["imageinfo"][0] timestamp = imageinfo["timestamp"]
import random import requests from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="quote ?(.*)")) async def quote_search(event): if event.fwd_from: return await event.edit("Processing...") search_string = event.pattern_match.group(1) input_url = "https://bots.shrimadhavuk.me/Telegram/GoodReadsQuotesBot/?q={}".format( search_string ) headers = {"USER-AGENT": "UniBorg"} try: response = requests.get(input_url, headers=headers).json() except: response = None if response is not None: result = ( random.choice(response).get("input_message_content").get("message_text") ) else: result = None if result: await event.edit(result.replace("<code>", "`").replace("</code>", "`")) else: await event.edit("Zero results found")
"""COMMAND : .cd, .scd, .padmin""" import asyncio from telethon import events from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="(f?c)d ")) async def timer_blankx(e): txt = e.text[4:] + "\nDeleting in " j = 86400 k = j for j in range(j): await e.edit(txt + str(k)) k = k - 50 await asyncio.sleep(50) if e.pattern_match.group(1) == "c": await e.delete() else:
# For @UniBorg # (c) Shrimadhav U K from telethon.tl.functions.channels import GetAdminedPublicChannelsRequest from uniborg.util import WhiteEye_on_cmd from WhiteEyeUserBot import CMD_HELP @WhiteEye.on(WhiteEye_on_cmd("listmyusernames")) async def mine(event): """ For .reserved command, get a list of your reserved usernames. """ result = await bot(GetAdminedPublicChannelsRequest()) output_str = "" if event.fwd_from: return for channel_obj in result.chats: output_str += f"{channel_obj.title}\n@{channel_obj.username}\n\n" await event.edit(output_str) CMD_HELP.update({ "listmyusernames": "**Listmyusernames**\ \n\n**Syntax : **`.listmyusernames`\ \n**Usage :** it lists all your usernames you are holding" })
from telethon.tl.functions.photos import DeletePhotosRequest, GetUserPhotosRequest from telethon.tl.types import InputPhoto from uniborg.util import edit_or_reply, WhiteEye_on_cmd, sudo_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="delpfp ?(.*)")) @WhiteEye.on(sudo_cmd(pattern="delpfp ?(.*)", allow_sudo=True)) async def remove_profilepic(delpfp): """ For .delpfp command, delete your current profile picture in Telegram. """ group = delpfp.text[8:] if group == "all": lim = 0 elif group.isdigit(): lim = int(group) else: lim = 1 pfplist = await delpfp.client( GetUserPhotosRequest(user_id=delpfp.from_id, offset=0, max_id=0, limit=lim)) input_photos = [] for sep in pfplist.photos: input_photos.append( InputPhoto( id=sep.id, access_hash=sep.access_hash, file_reference=sep.file_reference, )) await delpfp.client(DeletePhotosRequest(id=input_photos))
""" Whatever Plugin by Noobs of Telegram i.e. @pureindialover """ from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern=r"lmoon")) async def test(event): if event.fwd_from: return await event.edit( "🌕🌕🌕🌕🌕🌕🌕🌕\n🌕🌕🌖🌔🌖🌔🌕🌕\n🌕🌕🌗🌔🌖🌓🌕🌕\n🌕🌕🌗🌔🌖🌓🌕🌕\n🌕🌕🌖🌓🌗🌔🌕🌕\n🌕🌕🌗🌑🌑🌓🌕🌕\n🌕🌕🌗👀🌑🌓🌕🌕\n🌕🌕🌘👄🌑🌓🌕🌕\n🌕🌕🌗🌑🌑🌒🌕🌕\n🌕🌖🌑🌑🌑🌑🌔🌕\n🌕🌘🌑🌑🌑🌑🌒🌕\n🌖🌑🌑🌑🌑🌑🌑🌔\n🌕🤜🏻🌑🌑🌑🌑🤛🏻🌕\n🌕🌖🌑🌑🌑🌑🌔🌕\n🌘🌑🌑🌑🌑🌑🌑🌒\n🌕🌕🌕🌕🌕🌕🌕🌕" ) @WhiteEye.on(WhiteEye_on_cmd(pattern=r"city")) async def test(event): if event.fwd_from: return await event.edit("""☁☁🌞 ☁ ☁ ☁ ✈ ☁ 🚁 ☁ ☁ ☁ ☁ ☁ ☁ 🏬🏨🏫🏢🏤🏥🏦🏪🏫 🌲/ l🚍\🌳👭 🌳/ 🚘 l 🏃 \🌴 👬 👬 🌴/ l 🚔 \🌲 🌲/ 🚖 l \ 🌳/🚶 | 🚍 \ 🌴🚴🚴 🌴/ | \🌲""") @WhiteEye.on(WhiteEye_on_cmd(pattern=r"hello")) async def hi(event):
.verystream""" import asyncio import hashlib import json import os import time from datetime import datetime import aiohttp import magic import requests from uniborg.util import WhiteEye_on_cmd, progress @WhiteEye.on(WhiteEye_on_cmd(pattern="verystream ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return mone = await event.reply("Processing ...") if Config.VERY_STREAM_LOGIN is None or Config.VERY_STREAM_KEY is None: await mone.edit( "This module requires API key from https://verystream.com. Aborting!" ) return False input_str = event.pattern_match.group(1) if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) required_file_name = None start = datetime.now() if event.reply_to_msg_id and not input_str:
"""Emoji Available Commands: .emoji shrug .emoji apple .emoji :/ .emoji -_-""" import asyncio from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern=r"jio")) async def _(event): if event.fwd_from: return animation_interval = 1 animation_ttl = range(0, 19) # input_str = event.pattern_match.group(1) # if input_str == "jio": await event.edit("jio") animation_chars = [ "`Connecting To JIO Network 📡 ....`",
import asyncio from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="phub")) async def _(event): if event.fwd_from: return animation_interval = 0.5 animation_ttl = range(0, 101) await event.edit("phub") animation_chars = [ "P_", "PO_", "POR_", "PORN_", "PORNH_", "PORNHU_", "PORNHUB_", "PORNHUB", ] for i in animation_ttl:
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Command: .fpost word credit: @pureindialover""" import string from uniborg.util import WhiteEye_on_cmd msg_cache = {} @WhiteEye.on(WhiteEye_on_cmd(pattern=r"fpost\s+(.*)")) async def _(event): await event.delete() text = event.pattern_match.group(1) destination = await event.get_input_chat() for c in text.lower(): if c not in string.ascii_lowercase: continue if c not in msg_cache: async for msg in borg.iter_messages(None, search=c): if msg.raw_text.lower() == c and msg.media is None: msg_cache[c] = msg break await borg.forward_messages(destination, msg_cache[c])
"""Create Button Posts """ import re from telethon import custom from uniborg.util import WhiteEye_on_cmd # regex obtained from: https://github.com/PaulSonOfLars/tgbot/blob/master/tg_bot/modules/helper_funcs/string_handling.py#L23 BTN_URL_REGEX = re.compile( r"(\{([^\[]+?)\}\<buttonurl:(?:/{0,2})(.+?)(:same)?\>)") @WhiteEye.on(WhiteEye_on_cmd(pattern="cbutton")) # pylint:disable=E0602 async def _(event): if Config.TG_BOT_USER_NAME_BF_HER is None or tgbot is None: await event.edit( "need to set up a @BotFather bot for this module to work") return if Config.PRIVATE_CHANNEL_BOT_API_ID is None: await event.edit( "need to have a `PRIVATE_CHANNEL_BOT_API_ID` for this module to work" ) return reply_message = await event.get_reply_message() if reply_message is None: await event.edit("reply to a message that I need to parse the magic on" ) return
import re import bs4 import requests from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="giz ?(.*)")) async def gizoogle(event): if event.fwd_from: return input_str = event.pattern_match.group(1) await event.edit("Processing...") if not input_str: return await event.edit("I can't gizoogle nothing.") else: try: result = text(input_str) except: result = "Failed to gizoogle the text." finally: return await event.edit(result) def text(input_text: str) -> str: """Taken from https://github.com/chafla/gizoogle-py/blob/master/gizoogle.py""" params = {"translatetext": input_text} target_url = "http://www.gizoogle.net/textilizer.php" resp = requests.post(target_url, data=params) # the html returned is in poor form normally. soup_input = re.sub(
# Copyright (c) By Midhun KM [@StarkXD] # I Am Noob # Official Web : nekobot.xyz # "Copy It As You Want But Don't Edit Credits" import requests from uniborg.util import edit_or_reply, WhiteEye_on_cmd, sudo_cmd @WhiteEye.on(WhiteEye_on_cmd("ttt ?(.*)")) @WhiteEye.on(sudo_cmd("ttt ?(.*)", allow_sudo=True)) async def noobishere(event): reply_to_id = event.message.id if event.reply_to_msg_id: reply_to_id = event.reply_to_msg_id reply = await event.get_reply_message() if event.pattern_match.group(1): ipman = event.pattern_match.group(1) elif reply.text: ipman = reply.message else: await edit_or_reply(event, "Trump : What Should I Tweet For You ?") return url = f"https://nekobot.xyz/api/imagegen?type=trumptweet&text={ipman}" starkgang = requests.get(url=url).json() meikobot = starkgang.get("message") tweetimg = meikobot starkxd = f"Trump Has Tweeted {ipman}" await edit_or_reply(event, "Trump : Wait I Am Tweeting Your Texts") await event.client.send_file(event.chat_id, tweetimg,
"""Get info about a File Extension Syntax: .filext EXTENSION""" import requests from bs4 import BeautifulSoup from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="filext (.*)")) async def _(event): if event.fwd_from: return await event.edit("Processing ...") sample_url = "https://www.fileext.com/file-extension/{}.html" input_str = event.pattern_match.group(1).lower() response_api = requests.get(sample_url.format(input_str)) status_code = response_api.status_code if status_code == 200: raw_html = response_api.content soup = BeautifulSoup(raw_html, "html.parser") ext_details = soup.find_all("td", {"colspan": "3"})[-1].text await event.edit( "**File Extension**: `{}`\n**Description**: `{}`".format( input_str, ext_details ) ) else: await event.edit( "https://www.fileext.com/ responded with {} for query: {}".format( status_code, input_str ) )
# GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. from apscheduler.executors.asyncio import AsyncIOExecutor from apscheduler.schedulers.asyncio import AsyncIOScheduler from uniborg.util import WhiteEye_on_cmd, edit_or_reply, sudo_cmd from WhiteEyeUserBot import CMD_HELP from WhiteEyeUserBot.functions.matic_tool import auto_bio, auto_name, auto_pic scheduler = AsyncIOScheduler(executors={"default": AsyncIOExecutor()}) @WhiteEye.on(WhiteEye_on_cmd(pattern="autoname(?: |$)(.*)")) @WhiteEye.on(sudo_cmd(pattern="autoname(?: |$)(.*)", allow_sudo=True)) async def autoname(event): if event.fwd_from: return await edit_or_reply( event, "`Started AutoName Your Name Will Be Changed Every 1 Min, According To TimeZone Given. To Terminate This Process Use .stop Cmd`", ) scheduler.add_job( auto_name, "interval", args=[event.pattern_match.group(1)], minutes=1, id="autoname", )
import requests from uniborg.util import WhiteEye_on_cmd, sudo_cmd from WhiteEyeUserBot import CMD_HELP logging.basicConfig( format="[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s", level=logging.WARNING) def progress(current, total): logger.info("Downloaded {} of {}\nCompleted {}".format( current, total, (current / total) * 100)) @WhiteEye.on(WhiteEye_on_cmd("paste ?(.*)")) @WhiteEye.on(sudo_cmd("paste ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return datetime.now() if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) input_str = event.pattern_match.group(1) if input_str: message = input_str elif event.reply_to_msg_id: previous_message = await event.get_reply_message() if previous_message.media: downloaded_file_name = await borg.download_media( previous_message,
"""Emoji Available Commands: .emoji shrug .emoji apple .emoji :/ .emoji -_-""" import asyncio from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="emoji (.*)")) async def _(event): if event.fwd_from: return animation_interval = 0.3 animation_ttl = range(0, 16) input_str = event.pattern_match.group(1) if input_str == "shrug": await event.edit("¯\_(ツ)_/¯") elif input_str == "apple": await event.edit("\uF8FF") elif input_str == ":/": await event.edit(input_str) animation_chars = [":\\", ":/"] for i in animation_ttl: await asyncio.sleep(animation_interval) await event.edit(animation_chars[i % 2]) elif input_str == "-_-": await event.edit(input_str) animation_chars = ["-__-", "-_-"]
# plugin by lejend @ravana69 """Emoji Available Commands: .lucky""" import asyncio from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="lucky")) async def _(event): if event.fwd_from: return animation_interval = 0.5 animation_ttl = range(0, 17) # input_str = event.pattern_match.group(1) # if input_str == "lucky": await event.edit("Lucky..") animation_chars = [ "⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜[🎁](https://github.com/mrdayamzaidi-bit/WhiteEyeUserBot/)⬜",
"""Use cmd `.cry` to cry""" import asyncio from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="lcry")) async def _(event): if event.fwd_from: return animation_interval = 1 animation_ttl = range(0, 103) await event.edit("crying") animation_chars = [ ";__", ";___", ";____", ";_____", ";______", ";_______", ";________", ";__________", ";____________", ";______________",
Command .barcode (your text) By @snappy101 """ import asyncio import os from datetime import datetime import barcode from barcode.writer import ImageWriter from uniborg.util import WhiteEye_on_cmd, edit_or_reply, sudo_cmd from WhiteEyeUserBot import CMD_HELP @WhiteEye.on(WhiteEye_on_cmd(pattern="barcode ?(.*)")) @WhiteEye.on(sudo_cmd(pattern="barcode ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return await edit_or_reply(event, "...") start = datetime.now() input_str = event.pattern_match.group(1) message = "SYNTAX: `.barcode <long text to include>`" reply_msg_id = event.message.id if input_str: message = input_str elif event.reply_to_msg_id: previous_message = await event.get_reply_message() reply_msg_id = previous_message.id if previous_message.media:
"""use command .ducduckgo""" from uniborg.util import WhiteEye_on_cmd from WhiteEyeUserBot import CMD_HELP @WhiteEye.on(WhiteEye_on_cmd("ducduckgo (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) sample_url = "https://duckduckgo.com/?q={}".format( input_str.replace(" ", "+")) if sample_url: link = sample_url.rstrip() await event.edit( "Let me 🦆 DuckDuckGo that for you:\n🔎 [{}]({})".format( input_str, link)) else: await event.edit("something is wrong. please try again later.") CMD_HELP.update({ "duckduckgo": "**Duckduckgo**\ \n\n**Syntax : **`.ducduckgo <query>`\ \n**Usage :** get duckduckgo search query link" })
from telethon.tl import functions from telethon.tl.types import ( ChannelParticipantsKicked, ChatBannedRights, UserStatusEmpty, UserStatusLastMonth, UserStatusLastWeek, UserStatusOffline, UserStatusOnline, UserStatusRecently, ) from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="unbanall ?(.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) if input_str: logger.info("TODO: Not yet Implemented") else: if event.is_private: return False await event.edit("Searching Participant Lists.") p = 0 async for i in borg.iter_participants(event.chat_id, filter=ChannelParticipantsKicked, aggressive=True): rights = ChatBannedRights(until_date=0, view_messages=False)
# For Uniborg # (c) @INF1N17Y from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd("mention (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) if event.reply_to_msg_id: previous_message = await event.get_reply_message() if previous_message.forward: replied_user = previous_message.forward.from_id else: replied_user = previous_message.from_id else: await event.edit("reply To Message") user_id = replied_user caption = """<a href='tg://user?id={}'>{}</a>""".format(user_id, input_str) await event.edit(caption, parse_mode="HTML")
"""CoinFlip for @UniBorg Syntax: .coinflip [optional_choice]""" import random from uniborg.util import WhiteEye_on_cmd @WhiteEye.on(WhiteEye_on_cmd(pattern="coin ?(.*)")) async def _(event): if event.fwd_from: return r = random.randint(1, 100) input_str = event.pattern_match.group(1) if input_str: input_str = input_str.lower() if r % 2 == 1: if input_str == "heads": await event.edit( "The coin landed on: **Heads**. \n You were correct.") elif input_str == "tails": await event.edit( "The coin landed on: **Heads**. \n You weren't correct, try again ..." ) else: await event.edit("The coin landed on: **Heads**.") elif r % 2 == 0: if input_str == "tails": await event.edit( "The coin landed on: **Tails**. \n You were correct.") elif input_str == "heads": await event.edit(
"`You should try sleeping forever.`", "`Pick up a gun and shoot yourself.`", "`Try bathing with Hydrochloric Acid instead of water.`", "`Go Green! Stop inhaling Oxygen.`", "`God was searching for you. You should leave to meet him.`", "`You should Volunteer for target in an firing range.`", "`Try playing catch and throw with RDX its fun.`", "`People like you are the reason we have middle fingers.`", "`When your mom dropped you off at the school, she got a ticket for littering.`", "`You’re so ugly that when you cry, the tears roll down the back of your head…just to avoid your face.`", "`If you’re talking behind my back then you’re in a perfect position to kiss my a**!.`", ] # =========================================== @WhiteEye.on(WhiteEye_on_cmd(pattern="run ?(.*)")) @WhiteEye.on(sudo_cmd(pattern="run ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return bro = random.randint(0, len(RUNSREACTS) - 1) event.pattern_match.group(1) reply_text = RUNSREACTS[bro] await edit_or_reply(event, reply_text) @WhiteEye.on(WhiteEye_on_cmd(pattern="metoo ?(.*)")) @WhiteEye.on(sudo_cmd(pattern="metoo ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return