Skip to content

Commit

Permalink
Attempting to fix loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikey committed Jan 2, 2025
1 parent 9b5d8a0 commit d7c1378
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tasks/iterate_prc_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,12 @@ async def check_team_restrictions(bot, settings, guild_id, players):
kick_against.append(plr.username)
bot.team_restrictions_infractions[guild_id][plr.username] = 0
if len(load_against) > 0:
try:
await bot.prc_api.run_command(guild_id, f":load {','.join(load_against)}")
except:
logging.warning("PRC API Rate limit reached when loading.")
cmd = f":load {','.join(load_against)}"
if cmd.strip() != ":load":
try:
await bot.prc_api.run_command(guild_id, cmd)
except:
logging.warning("PRC API Rate limit reached when loading.")
for message, plrs_to_send in pm_against.items():
try:
await bot.scheduled_pm_queue.put((guild_id, ','.join(plrs_to_send), message))
Expand Down

0 comments on commit d7c1378

Please sign in to comment.