-
Notifications
You must be signed in to change notification settings - Fork 83
/
funnyfonts.py
237 lines (213 loc) · 7.47 KB
/
funnyfonts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
import random
import re
from userbot import catub
from userbot.core.managers import edit_or_reply
from userbot.plugins import fonts
plugin_category = "fun"
@catub.cat_cmd(
pattern="str(?:\s|$)([\s\S]*)",
command=("str", plugin_category),
info={
"header": "stretches the given text",
"usage": ["{tr}str <text>", "{tr}str reply this command to text message"],
"examples": "{tr}str catuserbot",
},
)
async def stretch(stret):
"stretches the given text"
textx = await stret.get_reply_message()
message = stret.text
message = stret.pattern_match.group(1)
if message:
pass
elif textx:
message = textx.text
else:
await edit_or_reply(stret, "`GiiiiiiiB sooooooomeeeeeee teeeeeeext!`")
return
count = random.randint(3, 10)
reply_text = re.sub(r"([aeiouAEIOUaeiouAEIOUаеиоуюяыэё])", (r"\1" * count), message)
await edit_or_reply(stret, reply_text)
@catub.cat_cmd(
pattern="zal(?:\s|$)([\s\S]*)",
command=("zal", plugin_category),
info={
"header": "chages given text into some funny way",
"usage": ["{tr}zal <text>", "{tr}zal reply this command to text message"],
"examples": "{tr}zal catuserbot",
},
)
async def zal(zgfy):
"chages given text into some funny way"
reply_text = []
textx = await zgfy.get_reply_message()
message = zgfy.pattern_match.group(1)
if message:
pass
elif textx:
message = textx.text
else:
await edit_or_reply(
zgfy, "`gͫ ̆ i̛ ̺ v͇̆ ȅͅ a̢ͦ s̴̪ c̸̢ ä̸ rͩͣ y͖͞ t̨͚ é̠ x̢͖ t͔͛`"
)
return
for charac in message:
if not charac.isalpha():
reply_text.append(charac)
continue
for _ in range(3):
randint = random.randint(0, 2)
if randint == 0:
charac = charac.strip() + random.choice(fonts.ZALG_LIST[0]).strip()
elif randint == 1:
charac = charac.strip() + random.choice(fonts.ZALG_LIST[1]).strip()
else:
charac = charac.strip() + random.choice(fonts.ZALG_LIST[2]).strip()
reply_text.append(charac)
await edit_or_reply(zgfy, "".join(reply_text))
@catub.cat_cmd(
pattern="cp(?:\s|$)([\s\S]*)",
command=("cp", plugin_category),
info={
"header": "chages given text into some funny way",
"usage": ["{tr}cp <text>", "{tr}cp reply this command to text message"],
"examples": "{tr}cp catuserbot",
},
)
async def copypasta(cp_e):
"chages given text into some funny way"
textx = await cp_e.get_reply_message()
message = cp_e.pattern_match.group(1)
if message:
pass
elif textx:
message = textx.text
else:
await edit_or_reply(cp_e, "`😂🅱️IvE👐sOME👅text👅for✌️Me👌tO👐MAkE👀iT💞funNy!💦`")
return
reply_text = random.choice(fonts.EMOJIS)
# choose a random character in the message to be substituted with 🅱️
b_char = random.choice(message).lower()
for owo in message:
if owo == " ":
reply_text += random.choice(fonts.EMOJIS)
elif owo in fonts.EMOJIS:
reply_text += owo
reply_text += random.choice(fonts.EMOJIS)
elif owo.lower() == b_char:
reply_text += "🅱️"
else:
reply_text += owo.upper() if bool(random.getrandbits(1)) else owo.lower()
reply_text += random.choice(fonts.EMOJIS)
await edit_or_reply(cp_e, reply_text)
@catub.cat_cmd(
pattern="weeb(?:\s|$)([\s\S]*)",
command=("weeb", plugin_category),
info={
"header": "chages given text into some funny way",
"usage": ["{tr}weeb <text>", "{tr}weeb reply this command to text message"],
"examples": "{tr}weeb catuserbot",
},
)
async def weebify(event):
"chages given text into some funny way"
args = event.pattern_match.group(1)
if not args:
get = await event.get_reply_message()
args = get.text
if not args:
await edit_or_reply(event, "`What I am Supposed to Weebify `")
return
string = "".join(args).lower()
for normiecharacter in string:
if normiecharacter in fonts.normiefont:
weebycharacter = fonts.weebyfont[fonts.normiefont.index(normiecharacter)]
string = string.replace(normiecharacter, weebycharacter)
await edit_or_reply(event, string)
@catub.cat_cmd(
pattern="downside(?:\s|$)([\s\S]*)",
command=("downside", plugin_category),
info={
"header": "chages given text into upside down",
"usage": [
"{tr}downside <text>",
"{tr}downside reply this command to text message",
],
"examples": "{tr}downside catuserbot",
},
)
async def stylish_generator(event):
"chages given text into upside down"
args = event.pattern_match.group(1)
if not args:
get = await event.get_reply_message()
args = get.text
if not args:
await edit_or_reply(event, "What I am Supposed to change give text")
return
string = "".join(args).lower()
for upsidecharacter in string:
if upsidecharacter in fonts.upsidefont:
downsidecharacter = fonts.downsidefont[
fonts.upsidefont.index(upsidecharacter)
]
string = string.replace(upsidecharacter, downsidecharacter)
await edit_or_reply(event, string)
@catub.cat_cmd(
pattern="subscript(?:\s|$)([\s\S]*)",
command=("subscript", plugin_category),
info={
"header": "chages given text into subscript",
"usage": [
"{tr}subscript <text>",
"{tr}subscript reply this command to text message",
],
"examples": "{tr}subscript catuserbot",
},
)
async def stylish_generator(event):
"chages given text into subscript"
args = event.pattern_match.group(1)
if not args:
get = await event.get_reply_message()
args = get.text
if not args:
await edit_or_reply(event, "What I am Supposed to change give text")
return
string = "".join(args).lower()
for normaltextcharacter in string:
if normaltextcharacter in fonts.normaltext:
subscriptcharacter = fonts.subscriptfont[
fonts.normaltext.index(normaltextcharacter)
]
string = string.replace(normaltextcharacter, subscriptcharacter)
await edit_or_reply(event, string)
@catub.cat_cmd(
pattern="superscript(?:\s|$)([\s\S]*)",
command=("superscript", plugin_category),
info={
"header": "chages given text into superscript",
"usage": [
"{tr}superscript <text>",
"{tr}superscript reply this command to text message",
],
"examples": "{tr}superscript catuserbot",
},
)
async def stylish_generator(event):
"chages given text into superscript"
args = event.pattern_match.group(1)
if not args:
get = await event.get_reply_message()
args = get.text
if not args:
await edit_or_reply(event, "What I am Supposed to change give text")
return
string = "".join(args).lower()
for normaltextcharacter in string:
if normaltextcharacter in fonts.normaltext:
superscriptcharacter = fonts.superscriptfont[
fonts.normaltext.index(normaltextcharacter)
]
string = string.replace(normaltextcharacter, superscriptcharacter)
await edit_or_reply(event, string)