From 43308b283565e2ea1cf74a28cb74b3ae1b390550 Mon Sep 17 00:00:00 2001 From: Robin5605 Date: Sat, 21 Sep 2024 15:56:59 -0500 Subject: [PATCH] Attach ReportView to lookup command response --- src/bot/exts/dragonfly/dragonfly.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bot/exts/dragonfly/dragonfly.py b/src/bot/exts/dragonfly/dragonfly.py index fef46a1..c60c3d1 100644 --- a/src/bot/exts/dragonfly/dragonfly.py +++ b/src/bot/exts/dragonfly/dragonfly.py @@ -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.")