๐ณ ๐ฎ ๐ฐ ๐ฎ ๐น ๐ฆ
import asyncio
import random, re
import os
import sys
from telethon import events
from uniborg.util import admin_cmd
from telethon.tl.functions.users import GetFullUserRequest
from telethon.tl.types import MessageEntityMentionName
from collections import deque
import requests
# ================= CONSTANT =================
EMOJIS = [
"๐",
"๐",
"๐",
"โ",
"๐",
"๐",
"๐",
"๐ฏ",
"๐ถ",
"๐",
"๐",
"๐",
"๐",
"๐",
"๐",
"๐ฅ",
"๐ด",
"๐ฆ",
"๐ฆ",
"๐",
"๐",
"๐ฉ",
"๐",
"๐๐",
"๐",
"๐ ",
"๐ฉ",
"๐ฐ",
]
#========================================================================================
@borg.on(events.NewMessage(pattern="^.cp(?: |$)(.*)", outgoing=True))
async def copypasta(cp_e):
""" Copypasta the famous meme """
if not cp_e.text[0].isalpha() and cp_e.text[0] not in ("/", "#", "@", "!"):
textx = await cp_e.get_reply_message()
message = cp_e.pattern_match.group(1)
if message:
pass
elif textx:
message = textx.text
else:
await cp_e.edit("`๐๐ ฑ๏ธIvE๐sOME๐ text๐ forโ๏ธMe๐tO๐MAkE๐iT๐funNy!๐ฆ`")
return
reply_text = random.choice(EMOJIS)
b_char = random.choice(
message
).lower() # choose a random character in the message to be substituted with ๐ ฑ๏ธ
for owo in message:
if owo == " ":
reply_text += random.choice(EMOJIS)
elif owo in emoji:
reply_text += owo
reply_text += random.choice(EMOJIS)
elif owo.lower() == b_char:
reply_text += "๐ ฑ๏ธ"
else:
if bool(random.getrandbits(1)):
reply_text += owo.upper()
else:
reply_text += owo.lower()
reply_text += random.choice(EMOJIS)
await cp_e.edit(reply_text)