Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove useless stuff #14

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
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
8 changes: 3 additions & 5 deletions commands/whitelist_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,16 @@ 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."
)
75efb6 marked this conversation as resolved.
Show resolved Hide resolved

await interaction.followup.send("Done.")
else:
Expand Down
Loading