Skip to content

Commit

Permalink
Merge pull request #14 from 75efb6/75efb6-patch-2
Browse files Browse the repository at this point in the history
Remove useless stuff
  • Loading branch information
75efb6 authored Jan 17, 2025
2 parents 6a73bf7 + 6dd6425 commit a52a782
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions commands/whitelist_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,15 @@ 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}"
async with session.get(second_api_url) as second_response:
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.")
Expand Down
6 changes: 2 additions & 4 deletions commands/whitelist_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,15 @@ 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}"
async with session.get(second_api_url) as second_response:
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.")
Expand Down

0 comments on commit a52a782

Please sign in to comment.