From f23117b92f4b905e4cb4e1aa57d359588dfec1f4 Mon Sep 17 00:00:00 2001 From: omame Date: Sat, 17 Dec 2022 17:59:36 +0100 Subject: [PATCH] fix(LaR): strip away extra spaces on content --- cogs/lar.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cogs/lar.py b/cogs/lar.py index 35659ed..dbdf8e2 100644 --- a/cogs/lar.py +++ b/cogs/lar.py @@ -28,8 +28,8 @@ async def learn(self, message: discord.Message): if reply.author.id in self.config.config["optout"]: return - content = qna.classes.sanitize_question(reply.clean_content + " " + - " ".join([attachment.url for attachment in reply.attachments])) + content = qna.classes.sanitize_question((reply.clean_content + " " + + " ".join([attachment.url for attachment in reply.attachments])).strip()) if content + str(message.guild.id) not in self.config.question_map.keys(): self.config.question_map.update({content + str(message.guild.id): qna.classes.Question( content, @@ -39,7 +39,7 @@ async def learn(self, message: discord.Message): reply.author.id )}) response_content = (message.clean_content + " " + - " ".join([attachment.url for attachment in message.attachments])) + " ".join([attachment.url for attachment in message.attachments])).strip() self.config.question_map[content + str(message.guild.id)].add_response(qna.classes.Response( response_content, message.guild.id,