Status
Represents a Discord user's status.
Attributes
str
The status's name.
int
Internal position of the status for sorting purposes.
str
The identifier value of the status.
Class Attributes
str
= ''
The default name of the statuses. Statuses sue their value as names, so this field is not used.
int
= 5
The default position of the statuses'.
A container what stores the predefined statuses in value
- status
relation. This container is accessed when translating status value to Status
object.
type
= str
The statuses' values' type.
Each predefined status also can be accessed as a class attribute:
Class attribute name | position | value |
---|---|---|
online | 0 | idle |
idle | 1 | idle |
dnd | 2 | dnd |
offline | 3 | offline |
invisible | 3 | invisible |
Methods
(value, name, position)
__init__Creates a new status and stores it at the class's .INSTANCES
class attribute.
Parameter | Type | Description |
---|---|---|
value |
| The identifier value of the status. |
name |
| The status's name. |
position |
| Internal position of the status for sorting purposes. |
(value)
getReturns the value's representation. If the value is already preinstanced, returns that, else creates a new object.
Parameter | Type | Description |
---|---|---|
value |
| The value to get it's representation. |
Returns
obj_ : PreinstancedBase
(value)
_from_valueCreates a new status object from the given value.
Parameter | Type | Description |
---|---|---|
value |
| The value what has no representation yet. |
Returns
self : Status
The created status.
()
__eq__Returns whether the two status is equal.
()
__ge__Returns whether this status's position is greater than the other's or whether the two status is equal.
()
__getattr__Drops a rich attribute error.
()
__gt__Returns whether this status's position is greater than the other's.
()
__hash__Returns the status's hash value.
()
__le__Returns whether this status's position is less than the other's or whether the two status is equal.
()
__lt__Returns whether this status's position is less than the other's.
()
__ne__Returns whether the two status is not equal.
()
__repr__Returns the representation of the status.