EULA

Represents a Discord end-user license agreement

Attributes

content : None, str

The eula's content.

id : int

The unique identifier number of the eula.

name : str

The eula's name.

Notes

The instances of the class support weakreferencing.

Properties

created_at

When the entity was created.

Returns

created_at : datetime

partial

Returns whether the entity is partial.

Returns

partial : bool

Methods

__new__(...)

Creates a new partial application eula.

ParameterTypeOptionalKeyword onlyDescription
content

None, str

The eula's content.

name

str

The eula's name.

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

copy()

Copies the eula.

Returns

new : instance<type<self>>

copy_with(...)

Copies the eula with the defined fields.

ParameterTypeOptionalKeyword onlyDescription
content

None, str

The eula's content.

name

str

The eula's name.

Returns

new : instance<type<self>>

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

from_data(data)

Creates a new eula instance from the given data.

If the eula already exists, returns that instead.

ParameterTypeDescription
data

dict<str, object>

Eula data.

precreate(eula_id, ...)

Creates an eula entity instance. When the eula is loaded with the same id, it will be picked up.

ParameterTypeOptionalKeyword onlyDescription
eula_id

int

The eula's identifier.

**keyword_parameters

Keyword parameters

Additional keyword parameters.

content

str

The eula's content.

name

str

The eula's name.

Returns

self : instance<cls>

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

to_data(...)

Converts the eula into a json serializable object.

ParameterTypeOptionalKeyword onlyDefaultDescription
defaults

bool

False

Whether default field values should be included.

include_internals

bool

False

Whether internal fields should be included.

Returns

data : dict of (str, object) items

_create_empty(entity_id)

Creates a new eula instance with it's attribute set to their default values.

ParameterTypeDescription
entity_id

int

The entity's identifier.

Returns

self : instance<cls>

_is_equal_same_type(other)

Returns whether self is equal to other. Other must be same type as self.

ParameterTypeDescription
other

instance<type<self>>

The other instance.

Returns

is_equal : bool

_update_attributes(data)

Updates the eula with the received data from Discord.

ParameterTypeDescription
data

dict<str, object>

Data received from Discord.

__eq__()

Returns whether the two eulas are equal.

__ge__()

Whether this entity's id is greater or equal than the other's.

__getattr__()

Drops a rich attribute error.

__gt__()

Whether this entity's id is greater than the other's.

__hash__()

Returns the hash value of the eula.

__le__()

Whether this entity's id is less or equal than the other's.

__lt__()

Whether this entity's id is less than the other's.

__ne__()

Returns whether the two eulas are not equal.

__repr__()

Returns the eula's representation