Skip to content

Commit

Permalink
fix(LaR): strip away extra spaces on content
Browse files Browse the repository at this point in the history
  • Loading branch information
omame committed Dec 17, 2022
1 parent 4795c9a commit f23117b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cogs/lar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit f23117b

Please sign in to comment.