diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index 9d470ba1..51c41bb6 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -805,7 +805,8 @@ async def response( return # Checks if the first word of the content after the prefix is a valid factoid # Replaces \n with spaces so factoid can be called even with newlines - query = message_content[1:].replace("\n", " ").split(" ")[0].lower() + prefix = config.extensions.factoids.prefix.value + query = message_content[len(prefix) :].replace("\n", " ").split(" ")[0].lower() try: factoid = await self.get_factoid(query, str(ctx.guild.id))