Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Update response.py
Browse files Browse the repository at this point in the history
fix #13
  • Loading branch information
FuseFairy authored Oct 23, 2023
1 parent 1f51675 commit 1f7da9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@ async def send_message(chatbot: Bard, interaction, user_message: str, image=None
await interaction.followup.send(response, embeds=images_embed, wait=True)
await interaction.followup.send(embed=more_images_embed, wait=True)
elif isinstance(interaction, discord.message.Message):
await interaction.channel.send(text, embeds=images_embed)
await interaction.channel.send(response, embeds=images_embed)
await interaction.channel.send(embed=more_images_embed)
elif len(images_embed) > 0:
if isinstance(interaction, discord.Interaction):
await interaction.followup.send(response, embeds=images_embed, wait=True)
elif isinstance(interaction, discord.message.Message):
await interaction.channel.send(text, embeds=images_embed)
await interaction.channel.send(response, embeds=images_embed)
else:
if isinstance(interaction, discord.Interaction):
await interaction.followup.send(response, wait=True)
elif isinstance(interaction, discord.message.Message):
await interaction.channel.send(text)
await interaction.channel.send(response)
except Exception as e:
if isinstance(interaction, discord.Interaction):
await interaction.followup.send(f">>> **ERROR: {e}**")
elif isinstance(interaction, discord.message.Message):
await interaction.channel.send(f">>> **ERROR: {e}**")
logger.exception(f"Error: {e}")
logger.exception(f"Error: {e}")

0 comments on commit 1f7da9b

Please # to comment.