aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/fun/uwu.py
diff options
context:
space:
mode:
authorGravatar AbooMinister25 <[email protected]>2022-08-08 20:44:18 -0400
committerGravatar AbooMinister25 <[email protected]>2022-08-08 20:44:18 -0400
commitf0455f9ae865e5d424e84cafdb52bc17f25b3db5 (patch)
treedda0dfe359f51156fec827b5f1c5d8fd71cc6405 /bot/exts/fun/uwu.py
parentRefactored methods _get_discord_message, _get_text_and_embed, and _convert_em... (diff)
Refactored get_discord_message to not unnecessarily log, and cleaned up uwu_command
Diffstat (limited to 'bot/exts/fun/uwu.py')
-rw-r--r--bot/exts/fun/uwu.py26
1 files changed, 9 insertions, 17 deletions
diff --git a/bot/exts/fun/uwu.py b/bot/exts/fun/uwu.py
index 60a5834d..83497893 100644
--- a/bot/exts/fun/uwu.py
+++ b/bot/exts/fun/uwu.py
@@ -11,9 +11,6 @@ from discord.ext.commands import Cog, Context, clean_content
from bot.bot import Bot
from bot.utils import helpers, messages
-if t.TYPE_CHECKING:
- from bot.exts.fun.fun import Fun # pragma: no cover
-
WORD_REPLACE = {
"small": "smol",
"cute": "kawaii~",
@@ -180,21 +177,16 @@ class Uwu(Cog):
await clean_content(fix_channel_mentions=True).convert(ctx, text)
- fun_cog: t.Optional[Fun] = ctx.bot.get_cog("Fun")
-
- if fun_cog:
- # Grabs the text from the embed for uwuification
- if embeds:
- embed = messages.convert_embed(self._uwuify, embeds[0])
- else:
- # Parse potential message links in text
- text, embed = await messages.get_text_and_embed(ctx, text)
-
- # If an embed is found, grab and uwuify its text
- if embed:
- embed = messages.convert_embed(self._uwuify, embed)
+ # Grabs the text from the embed for uwuification
+ if embeds:
+ embed = messages.convert_embed(self._uwuify, embeds[0])
else:
- embed = None
+ # Parse potential message links in text
+ text, embed = await messages.get_text_and_embed(ctx, text)
+
+ # If an embed is found, grab and uwuify its text
+ if embed:
+ embed = messages.convert_embed(self._uwuify, embed)
# Adds the text harvested from an embed to be put into another quote block.
if text: