mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-04 01:00:00 +00:00
Add missing scheduled_event field to StageChannel.create_instance
This commit is contained in:
parent
220607f67e
commit
ebe2661f7d
@ -1600,6 +1600,7 @@ class StageChannel(VocalGuildChannel):
|
|||||||
topic: str,
|
topic: str,
|
||||||
privacy_level: PrivacyLevel = MISSING,
|
privacy_level: PrivacyLevel = MISSING,
|
||||||
send_start_notification: bool = False,
|
send_start_notification: bool = False,
|
||||||
|
scheduled_event: Snowflake = MISSING,
|
||||||
reason: Optional[str] = None,
|
reason: Optional[str] = None,
|
||||||
) -> StageInstance:
|
) -> StageInstance:
|
||||||
"""|coro|
|
"""|coro|
|
||||||
@ -1621,6 +1622,10 @@ class StageChannel(VocalGuildChannel):
|
|||||||
You must have :attr:`~Permissions.mention_everyone` to do this.
|
You must have :attr:`~Permissions.mention_everyone` to do this.
|
||||||
|
|
||||||
.. versionadded:: 2.3
|
.. versionadded:: 2.3
|
||||||
|
scheduled_event: :class:`~discord.abc.Snowflake`
|
||||||
|
The guild scheduled event associated with the stage instance.
|
||||||
|
|
||||||
|
.. versionadded:: 2.4
|
||||||
reason: :class:`str`
|
reason: :class:`str`
|
||||||
The reason the stage instance was created. Shows up on the audit log.
|
The reason the stage instance was created. Shows up on the audit log.
|
||||||
|
|
||||||
@ -1647,6 +1652,9 @@ class StageChannel(VocalGuildChannel):
|
|||||||
|
|
||||||
payload['privacy_level'] = privacy_level.value
|
payload['privacy_level'] = privacy_level.value
|
||||||
|
|
||||||
|
if scheduled_event is not MISSING:
|
||||||
|
payload['guild_scheduled_event_id'] = scheduled_event.id
|
||||||
|
|
||||||
payload['send_start_notification'] = send_start_notification
|
payload['send_start_notification'] = send_start_notification
|
||||||
|
|
||||||
data = await self._state.http.create_stage_instance(**payload, reason=reason)
|
data = await self._state.http.create_stage_instance(**payload, reason=reason)
|
||||||
|
@ -1918,6 +1918,7 @@ class HTTPClient:
|
|||||||
'topic',
|
'topic',
|
||||||
'privacy_level',
|
'privacy_level',
|
||||||
'send_start_notification',
|
'send_start_notification',
|
||||||
|
'guild_scheduled_event_id',
|
||||||
)
|
)
|
||||||
payload = {k: v for k, v in payload.items() if k in valid_keys}
|
payload = {k: v for k, v in payload.items() if k in valid_keys}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user