diff --git a/cogs/impersonation.py b/cogs/impersonation.py index 506eef6..fd8007d 100644 --- a/cogs/impersonation.py +++ b/cogs/impersonation.py @@ -105,11 +105,14 @@ async def echo(self, ctx: commands.Context, *, text: str): dataset = await self.messages.containing(text) if not dataset or len(dataset) < self.messages.min_limit: - return await ctx.message.reply("I couldn't find any messages containing that text.", mention_author=False) + return await ctx.message.reply("I couldn't find enough messages containing that text.", mention_author=False) while True: message = await self.messages.generate(dataset) + if not message: + return await ctx.message.reply("I couldn't generate a message based on that word.", mention_author=False) + if text in message: break