From e5d466cf8b0fcebd5eda350d46e551fd15b932d3 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Mon, 19 Feb 2024 18:42:13 -0500 Subject: [PATCH] fix(tts): awaited a coroutine and added an error message if you load the cog without pylav loaded --- tts/tts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tts/tts.py b/tts/tts.py index 12c530f..1c9fdca 100644 --- a/tts/tts.py +++ b/tts/tts.py @@ -36,7 +36,8 @@ class TTS(commands.Cog): pylav = self.bot.get_cog("PyLavPlayer") self.check_pylav.stop() if pylav is None: - self.bot.remove_cog("TTS") + await self.bot.send_to_owners("You need to install PyLav to use the TTS cog.\nThe cog has been automatically unloaded.\nSee https://github.com/PyLav/Red-Cogs") + await self.bot.remove_cog("TTS") raise RuntimeError("You need to install PyLav to use this cog. See https://github.com/PyLav/Red-Cogs") async def on_message(self, message: Message):