berconpy.Player¶
- class berconpy.Player(cache, id, name, guid, addr, ping, is_guid_valid, in_lobby)¶
Bases:
PlayerAn asynchronous implemenation of the
Playerclass.Methods
ban_guid([duration, reason])Bans the player from the server using their GUID.
ban_ip([duration, reason])Bans the player from the server using their IP.
Checks if the player is still in the client's cache.
kick([reason])Kicks the player from the server.
send(message)Sends a message to the player.
Attributes
The ID assigned to this player by the server.
The player's name.
The player's GUID.
The IP address and port this player connected from.
The player's ping on the server.
Whether the server has confirmed the validity of this player's GUID.
Whether the player is in the server lobby or not.
The cache that created this object.
Returns the client associated with the cache.
Returns the IP address of the player.
- async ban_guid(duration=None, reason='')¶
Bans the player from the server using their GUID.
- Return type:
- async ban_ip(duration=None, reason='')¶
Bans the player from the server using their IP.
- Return type:
- async kick(reason='')¶
Kicks the player from the server.
- async send(message)¶
Sends a message to the player.
- property cache: AsyncRCONClientCache¶
The cache that created this object.
- property client: AsyncRCONClient | None¶
Returns the client associated with the cache.
-
guid:
str¶ The player’s GUID. This may be an empty string if the client has not yet received the GUID from the server.