ThreadProfile
Represents an user's profile inside of a thread channel.
Attributes flags :
user specific settings of the profile.
None
, datetime
The date when the user joined the thread.
Properties
created_at
Methods
(...)
__new__Creates a new thread profile with the given parameters.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
flags |
| user specific settings of the profile. | ||
joined_at |
| The date when the user joined the thread. |
Raises
TypeError
- If a parameter's type is incorrect.
- Extra or unused parameters.
ValueError
- If a parameter's value is incorrect.
()
copyCopies the thread profile.
Returns
new : instance<type<self>>
(...)
copy_withCopies the thread profile and modifies the defined the defined fields of it.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
flags |
| user specific settings of the profile. | ||
joined_at |
| The date when the user joined the thread. |
Returns
new : instance<type<self>>
Raises
TypeError
- If a parameter's type is incorrect.
- Extra or unused parameters.
ValueError
- If a parameter's value is incorrect.
(data)
from_dataCreates a thread profile from the given data.
Parameter | Type | Description |
---|---|---|
data |
| Received thread profile data. |
Returns
self : instance<cls>
(...)
to_dataConverts the thread profile to a json serializable object.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
defaults |
|
| Whether default values should be included as well. | ||
include_internals |
|
| Whether internal fields should be included as well. |
Returns
data : dict
of (str
, object
) items
(data)
_difference_update_attributesUpdates the thread profile and returns it's changed attributes in a dict
within attribute-name
- old-value
relation.
Parameter | Type | Description |
---|---|---|
data |
| Data received from Discord. |
Returns
old_attributes : dict
of (str
, object
) items
All item in the returned dict is optional.
Returned Data Structure
Keys | Values |
---|---|
flags | ThreadProfileFlag |
(data)
_update_attributesUpdates the thread profile with overwriting it's old attributes.
Parameter | Type | Description |
---|---|---|
data |
| Received thread profile data. |
()
__eq__Returns whether the two thread profiles are equal.
()
__getattr__Drops a rich attribute error.
()
__hash__Returns the thread profile's hash value.
()
__repr__Returns the thread profile's representation.