Skip to content

Commit

Permalink
Return set_team_switch_cooldown result as a bool and not str
Browse files Browse the repository at this point in the history
  • Loading branch information
cemathey committed May 22, 2024
1 parent 08f76c1 commit 0621d6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions rcon/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,11 @@ def set_autobalance_threshold(self, max_diff: int):
== SUCCESS
)

def set_team_switch_cooldown(self, minutes):
return self._str_request(f"setteamswitchcooldown {minutes}", log_info=True)
def set_team_switch_cooldown(self, minutes: int) -> bool:
return (
self._str_request(f"setteamswitchcooldown {minutes}", log_info=True)
== SUCCESS
)

def set_queue_length(self, value: int) -> bool:
return (
Expand Down
2 changes: 1 addition & 1 deletion rcon/rcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ def get_name(self) -> str:
def get_team_switch_cooldown(self) -> int:
return int(super().get_team_switch_cooldown())

def set_team_switch_cooldown(self, minutes) -> str:
def set_team_switch_cooldown(self, minutes: int) -> bool:
with invalidates(Rcon.get_team_switch_cooldown):
return super().set_team_switch_cooldown(minutes)

Expand Down

0 comments on commit 0621d6f

Please sign in to comment.