Skip to content

Commit

Permalink
Attach ReportView to lookup command response
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin5605 committed Sep 21, 2024
1 parent 7848d6c commit 43308b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bot/exts/dragonfly/dragonfly.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,9 @@ async def lookup(self: Self, interaction: discord.Interaction, name: str, versio
"""Pull the scan results for a package."""
scan_results = await self.bot.dragonfly_services.get_scanned_packages(name=name, version=version)
if scan_results:
embed = _build_package_scan_result_embed(scan_results[0])
await interaction.response.send_message(embed=embed)
package = scan_results[0]
embed = _build_package_scan_result_embed(package)
await interaction.response.send_message(embed=embed, view=ReportView(self.bot, package))
else:
await interaction.response.send_message("No entries were found with the specified filters.")

Expand Down

0 comments on commit 43308b2

Please sign in to comment.