Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions apps/discord_bot/src/five08/discord_bot/cogs/crm.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ async def callback(self, interaction: discord.Interaction) -> None:
resource_id=self.resume_id,
)
await interaction.followup.send(
"❌ An unexpected error occurred while downloading the resume."
"❌ An unexpected error occurred while downloading the resume.",
ephemeral=True,
)


Expand Down Expand Up @@ -4624,13 +4625,15 @@ async def _download_and_send_resume(
discord_file = discord.File(file_buffer, filename=filename)

await interaction.followup.send(
f"📄 Resume for **{contact_name}**:", file=discord_file
f"📄 Resume for **{contact_name}**:", file=discord_file, ephemeral=True
)
return True

except EspoAPIError as e:
logger.error(f"Failed to download resume {resume_id}: {e}")
await interaction.followup.send(f"❌ Failed to download resume: {str(e)}")
await interaction.followup.send(
f"❌ Failed to download resume: {str(e)}", ephemeral=True
)
return False
Comment thread
lairwaves marked this conversation as resolved.

def _check_member_role(self, interaction: discord.Interaction) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_crm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ async def test_download_and_send_resume_api_error(self, crm_cog, mock_interactio
)

mock_interaction.followup.send.assert_called_once_with(
"❌ Failed to download resume: API Error"
"❌ Failed to download resume: API Error", ephemeral=True
)

def test_role_id_cache_initializes_empty(self, jobs_cog):
Expand Down