diff --git a/commands/whitelist_add.py b/commands/whitelist_add.py index a07a970..4807851 100644 --- a/commands/whitelist_add.py +++ b/commands/whitelist_add.py @@ -48,8 +48,6 @@ async def _whitelist_add( item["beatmap_id"] for item in data if "beatmap_id" in item ] - ## Collect data from the second API for each ID - collected_data = [] for beatmap_id in beatmap_ids: ## Inserting maps into whitelist second_api_url = f"{config.domain}/api/wl_add?key={config.wl_key}&bid={beatmap_id}" @@ -57,8 +55,8 @@ async def _whitelist_add( if second_response.status == 200: pass else: - collected_data.append( - {"id": id, "error": "Failed to fetch details"} + await interaction.followup.send( + "Failed inserting maps to whitelist." ) await interaction.followup.send("Done.") diff --git a/commands/whitelist_remove.py b/commands/whitelist_remove.py index 0f780b9..6a701ab 100644 --- a/commands/whitelist_remove.py +++ b/commands/whitelist_remove.py @@ -48,8 +48,6 @@ async def _whitelist_remove( item["beatmap_id"] for item in data if "beatmap_id" in item ] - # Collect data from the second API for each ID - collected_data = [] for beatmap_id in beatmap_ids: ## Inserting maps into whitelist second_api_url = f"{config.domain}/api/wl_remove?key={config.wl_key}&bid={beatmap_id}" @@ -57,8 +55,8 @@ async def _whitelist_remove( if second_response.status == 200: pass else: - collected_data.append( - {"id": id, "error": "Failed to fetch details"} + await interaction.followup.send( + "Failed to remove maps from whitelist." ) await interaction.followup.send("Done.")