Stage
Represents an active stage instance of a stage channel.
Attributes
int
The stage channel's identifier where the stage is active.
bool
Whether the stage is discoverable. Only applies for public stages.
int
The stage guild's identifier.
int
The stage instance's identifier.
None
, str
Invite code to the stage's channel.
The privacy level of the stage.
int
The scheduled event's identifier that started the stage.
None
, str
The topic of the stage. Can be empty string.
Properties
channel
created_at
When the entity was created.
Returns
created_at : datetime
guild
partial
Returns whether the stage is partial.
Returns
partial : bool
Methods
(...)
__new__Creates a partial stage with the given fields.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
privacy_level |
| The privacy level of the stage. | ||
scheduled_event_id |
| The scheduled event's identifier that started the stage. | ||
topic |
| The topic of the stage. Can be empty string. |
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
()
copyCopies the stage state.
Returns
new : instance<type<self>>
(...)
copy_withCopies the stage with the given fields.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
privacy_level |
| The privacy level of the stage. | ||
scheduled_event_id |
| The scheduled event's identifier that started the stage. | ||
topic |
| The topic of the stage. Can be empty string. |
Returns
new : instance<type<self>>
Raises
TypeError
- If a parameter's value is incorrect.
ValueError
- If a parameter's type is incorrect.
(data, ...)
from_dataCreates a new stage instance from the received data.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
data |
| Stage data. | |||
strong_cache |
|
| Whether the instance should be put into its strong cache. |
Returns
self : instance<cls>
(stage_id, ...)
precreatePrecreates the stage by creating a partial one with the given parameters. When the stage is loaded the precreated one will be picked up. If an already existing stage would be precreated, returns that instead and updates that only, if that is partial.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
stage_id |
| The stage's identifier. | ||
**keyword_parameters | keyword parameters | Additional predefined attributes for the stage. | ||
channel |
| Alternative for | ||
channel_id |
| The stage channel or its identifier where the stage is active. | ||
discoverable |
| Whether the stage is discoverable. Only applies for public stages. | ||
guild |
| Alternative for | ||
guild_id |
| The stage's guild or its identifier. | ||
invite_code |
| Invite code to the stage's channel. | ||
privacy_level |
| The privacy level of the stage. | ||
scheduled_event |
| Alternative for | ||
scheduled_event_id |
| The scheduled event or its identifier that started the stage. | ||
topic |
| The topic of the stage. Can be empty string. |
Returns
self : instance<cls>
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
(...)
to_dataSerialises the stage to json serializable object.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
defaults |
|
| Whether default values should be included as well. | ||
include_internals |
|
| Whether we want to include identifiers as well. |
Returns
data : dict
of (str
, object
) Items
(stage_id)
_create_emptyCreates a stage instance with its attributes set to their default values.
Parameter | Type | Description |
---|---|---|
stage_id |
| The stage's identifier. |
Returns
self : instance<cls>
()
_deleteRemoves the stage's references.
(data)
_difference_update_attributesUpdates the stage from the given data and returns the changed attributes in attribute-name
- old-value
relation.
Parameter | Type | Description |
---|---|---|
data |
| Stage data. |
Returns
old_attributes : dict
of (str
, object
) items
The changed attributes of the stage.
Each item in the returned dictionary is optional.
Returned Data Structure
Keys | Values |
---|---|
discoverable | bool |
invite_code | None , str |
privacy_level | PrivacyLevel |
topic | None , str |
()
_get_hash_partialReturns the stage's hash value. This function is called when the stage is partial.
Returns
hash_value : int
(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)
_set_attributesSets the stage's attributes from the given data. Excludes .id
.
Parameter | Type | Description |
---|---|---|
data |
| Stage data. |
(data)
_update_attributesUpdates the stage from the given data.
Parameter | Type | Description |
---|---|---|
data |
| Stage data. |
()
__eq__Returns whether the two stages 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__Hashes the stage.
()
__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 stages are not equal.
()
__repr__Returns the stage's representation.