From 593d05ea24d23d7ee51262b618c96b69c77d01cc Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Mon, 22 Jul 2024 12:24:50 -0700 Subject: [PATCH] Allows factoid prefix longer than 1 character (#1087) --- techsupport_bot/commands/factoids.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))