Skip to content

Commit

Permalink
Fix conversation tagging bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Dec 31, 2023
1 parent 28081b5 commit 01de45a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cogs/text_service_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,14 +748,15 @@ async def on_message(self, message: discord.Message):
amended_message += text

# Process the message if the user is in a conversation
if await TextService.process_conversation_message(
conversation_processed = await TextService.process_conversation_message(
self,
message,
USER_INPUT_API_KEYS,
USER_KEY_DB,
files=None if len(attachments) < 1 else attachments,
amended_message=amended_message,
):
)
if conversation_processed:
print("Processed a conversation message in server", message.guild.name)
self.usage_service.update_usage_memory(
message.guild.name, "conversation_message", 1
Expand All @@ -766,7 +767,7 @@ async def on_message(self, message: discord.Message):
if f"<@{self.bot.user.id}>" in message.content and not (
"@everyone" in message.content or "@here" in message.content
):
if not BOT_TAGGABLE:
if not BOT_TAGGABLE or conversation_processed: # Don't go through the tagging system if we're in a conversation
return

# Check if any of the message author's role names are in BOT_TAGGABLE_ROLES, if not, return
Expand Down

0 comments on commit 01de45a

Please sign in to comment.