From 202d53b3f7ebe4d6041a2e5a4c1419bc16b27e11 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Tue, 12 Jul 2022 15:48:23 -0400 Subject: Type annotations for fun_cog --- bot/exts/fun/uwu.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bot/exts/fun/uwu.py b/bot/exts/fun/uwu.py index e70d1c0f..f18b3658 100644 --- a/bot/exts/fun/uwu.py +++ b/bot/exts/fun/uwu.py @@ -10,6 +10,9 @@ from discord.ext.commands import Cog, Context, clean_content from bot.bot import Bot from bot.utils import helpers +if t.TYPE_CHECKING: + from bot.exts.fun.fun import Fun # pragma: no cover + WORD_REPLACE = { "small": "smol", "cute": "kawaii~", @@ -126,7 +129,8 @@ class Uwu(Cog): await clean_content(fix_channel_mentions=True).convert(ctx, text) - if fun_cog := ctx.bot.get_cog("Fun"): + fun_cog: t.Optional[Fun] = ctx.bot.get_cog("Fun") + if fun_cog: text, embed = await fun_cog._get_text_and_embed(ctx, text) # Grabs the text from the embed for uwuification. -- cgit v1.2.3