Skip to content

Ban entry

Generic models for ban entries.

BanEntryRequest

A generic model for ban entry requests.

Parameters:

Name Type Description Default
provider str

Source for where the user or guild is banned.

required
reason str

Why the user or guild is banned.

required
moderator int

User ID of the responsible moderator, usually Discord.

required
reason_key str | None

Machine-readable version of the reason - only present for providers ravy and dservices.

None

Attributes:

Name Type Description
provider str

Source for where the user or guild is banned.

reason str

Why the user or guild is banned.

moderator int

User ID of the responsible moderator, usually Discord.

reason_key str | None

Machine-readable version of the reason - only present for providers ravy and dservices.

moderator property

moderator: int

User ID of the responsible moderator, usually Discord.

provider property

provider: str

Source for where the user or guild is banned.

reason property

reason: str

Why the user or guild is banned.

reason_key property

reason_key: str | None

Machine-readable version of the reason - only present for providers ravy and dservices.

__init__

__init__(provider: str, reason: str, moderator: int, reason_key: str | None = None) -> None

Parameters:

Name Type Description Default
provider str

Source for where the user or guild is banned.

required
reason str

Why the user or guild is banned.

required
moderator int

User ID of the responsible moderator, usually Discord.

required
reason_key str | None

Machine-readable version of the reason - only present for providers ravy and dservices.

None

to_json

to_json() -> dict[str, Any]

Returns a JSON representation of the model.

Returns:

Type Description
dict[str, Any]

A JSON representation of the model.

BanEntryResponse

A generic model for ban entry responses.

Attributes:

Name Type Description
data dict[str, Any]

The raw data returned from the Ravy API.

provider str

Source for where the user or guild was banned.

reason str

Why the user or guild was banned.

reason_key str | None

Machine-readable version of the reason - only present for providers ravy and dservices.

moderator int

User ID of the responsible moderator, usually Discord.

data property

data: dict[str, Any]

The raw data returned from the Ravy API.

moderator property

moderator: int

User ID of the responsible moderator, usually Discord.

provider property

provider: str

Source for where the user or guild was banned.

reason property

reason: str

Why the user or guild was banned.

reason_key property

reason_key: str | None

Machine-readable version of the reason - only present for providers ravy and dservices.