berconpy.Ban

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

Represents a GUID/IP ban on the server.

Methods

unban()

Removes this ban from the server.

Attributes

client

The client that created this object.

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.

async unban()

Removes this ban from the server.

client: AsyncRCONClient

The client that created this object.

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.