mirror of
https://github.com/UiO-Gaming/mustafa.git
synced 2026-11-05 13:56:48 +01:00
add kaomoji to /owo
This commit is contained in:
1 file changed
+25
-1
+25
-1
@@ -17,6 +17,25 @@ from cogs.utils import discord_utils
|
||||
from cogs.utils import embed_templates
|
||||
from cogs.utils import misc_utils
|
||||
|
||||
# Some kaomoji from kaomoji.moe. They don't have an API :(
|
||||
KAOMOJI = [
|
||||
"(・`ω´・)",
|
||||
";;w;;",
|
||||
"owo",
|
||||
"UwU",
|
||||
">w<",
|
||||
"^w^",
|
||||
"(◕ᴥ◕)",
|
||||
"ʕ•ᴥ•ʔ",
|
||||
"(*≧ω≦*)",
|
||||
"(ノ´ヮ`)ノ*: ・゚",
|
||||
"(。♥‿♥。)",
|
||||
"(✿◠‿◠)",
|
||||
"(⁄ ⁄•⁄ω⁄•⁄ ⁄)",
|
||||
"(´。• ω •。`)",
|
||||
"x3",
|
||||
]
|
||||
|
||||
|
||||
class Misc(commands.Cog):
|
||||
"""Miscellaneous commands that don't fit anywhere else"""
|
||||
@@ -69,7 +88,12 @@ class Misc(commands.Cog):
|
||||
text = re.sub(r"th", "d", text, flags=re.IGNORECASE)
|
||||
text = text.replace("ove", "uv")
|
||||
|
||||
# TODO: add kaomoji? https://kaomoji.moe/
|
||||
# Add a kaomoji after every sentence, and at the end if the text doesn't end with punctuation
|
||||
text = re.sub(
|
||||
r"[.!?]+(?=\s|$)|(?<![.!?])$",
|
||||
lambda match: f"{match.group()} {discord.utils.escape_markdown(random.choice(KAOMOJI))}",
|
||||
text.rstrip(),
|
||||
)
|
||||
|
||||
if len(text) >= 1000:
|
||||
embed = embed_templates.error_warning("Teksten er for lang")
|
||||
|
||||
Reference in new issue
Block a user