Skip to content

Commit

Permalink
Fix type conversion issues in BaseRustSocket constructor (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
neverabsolute authored Jan 28, 2024
1 parent 98ac223 commit 275383f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rustplus/api/base_rust_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ def __init__(
if player_token is None:
raise ValueError("PlayerToken cannot be None")

try:
steam_id = int(steam_id)
except ValueError:
raise ValueError("SteamID must be an integer")

try:
player_token = int(player_token)
except ValueError:
raise ValueError("PlayerToken must be an integer")

self.server_id = ServerID(ip, port, steam_id, player_token)
self.seq = 1
self.command_options = command_options
Expand Down

0 comments on commit 275383f

Please sign in to comment.