EULA
Represents a Discord end-user license agreement
Attributes
None
, str
The eula's content.
int
The unique identifier number of the eula.
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.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
content |
| The eula's content. | ||
name |
| The eula's name. |
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
()
copyCopies the eula.
Returns
new : instance<type<self>>
(...)
copy_withCopies the eula with the defined fields.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
content |
| The eula's content. | ||
name |
| 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.
(data)
from_dataCreates a new eula instance from the given data.
If the eula already exists, returns that instead.
Parameter | Type | Description |
---|---|---|
data |
| Eula data. |
(eula_id, ...)
precreateCreates an eula entity instance. When the eula is loaded with the same id, it will be picked up.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
eula_id |
| The eula's identifier. | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters. | ||
content |
| The eula's content. | ||
name |
| 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_dataConverts the eula into a json serializable object.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
defaults |
|
| Whether default field values should be included. | ||
include_internals |
|
| Whether internal fields should be included. |
Returns
data : dict
of (str
, object
) items
(entity_id)
_create_emptyCreates a new eula instance with it's attribute set to their default values.
Parameter | Type | Description |
---|---|---|
entity_id |
| The entity's identifier. |
Returns
self : instance<cls>
(other)
_is_equal_same_typeReturns whether self is equal to other. Other must be same type as self.
Parameter | Type | Description |
---|---|---|
other |
| The other instance. |
Returns
is_equal : bool
(data)
_update_attributesUpdates the eula with the received data from Discord.
Parameter | Type | Description |
---|---|---|
data |
| 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