berconpy.Ban

class berconpy.Ban(cache, index, id, duration, reason)

Bases: Ban

An asynchronous implemenation of the Ban class.

Methods

unban()

Removes this ban from the server.

Attributes

index

The index assigned to this ban by the server.

id

The player identifier this ban affects.

duration

The duration of the ban in minutes.

reason

The reason given for the ban.

cache

The cache that created this object.

client

Returns the client associated with the cache.

async unban()

Removes this ban from the server.

Return type:

str

Returns:

The response from the server, if any.

property cache: AsyncRCONClientCache

The cache that created this object.

property client: AsyncRCONClient | None

Returns the client associated with the cache.

duration: Optional[int]

The duration of the ban in minutes.

If the ban has expired, this will be -1. If the ban is permanent, this will be None.

id: str

The player identifier this ban affects.

This can be either a BattlEye GUID or an IP address.

index: int

The index assigned to this ban by the server.

This is non-unique and is subject to change, so it cannot be reliably used for unbanning.

reason: str

The reason given for the ban.