mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Add missing param send_start_notification to create_instance
This commit is contained in:
parent
103d75540c
commit
dc9fb1fd84
@ -1594,7 +1594,12 @@ class StageChannel(VocalGuildChannel):
|
||||
return utils.get(self.guild.stage_instances, channel_id=self.id)
|
||||
|
||||
async def create_instance(
|
||||
self, *, topic: str, privacy_level: PrivacyLevel = MISSING, reason: Optional[str] = None
|
||||
self,
|
||||
*,
|
||||
topic: str,
|
||||
privacy_level: PrivacyLevel = MISSING,
|
||||
send_start_notification: bool = False,
|
||||
reason: Optional[str] = None,
|
||||
) -> StageInstance:
|
||||
"""|coro|
|
||||
|
||||
@ -1610,6 +1615,11 @@ class StageChannel(VocalGuildChannel):
|
||||
The stage instance's topic.
|
||||
privacy_level: :class:`PrivacyLevel`
|
||||
The stage instance's privacy level. Defaults to :attr:`PrivacyLevel.guild_only`.
|
||||
send_start_notification: :class:`bool`
|
||||
Whether to send a start notification. This sends a push notification to @everyone if ``True``. Defaults to ``False``.
|
||||
You must have :attr:`~Permissions.mention_everyone` to do this.
|
||||
|
||||
.. versionadded:: 2.3
|
||||
reason: :class:`str`
|
||||
The reason the stage instance was created. Shows up on the audit log.
|
||||
|
||||
@ -1636,6 +1646,8 @@ class StageChannel(VocalGuildChannel):
|
||||
|
||||
payload['privacy_level'] = privacy_level.value
|
||||
|
||||
payload['send_start_notification'] = send_start_notification
|
||||
|
||||
data = await self._state.http.create_stage_instance(**payload, reason=reason)
|
||||
return StageInstance(guild=self.guild, state=self._state, data=data)
|
||||
|
||||
|
@ -1905,6 +1905,7 @@ class HTTPClient:
|
||||
'channel_id',
|
||||
'topic',
|
||||
'privacy_level',
|
||||
'send_start_notification',
|
||||
)
|
||||
payload = {k: v for k, v in payload.items() if k in valid_keys}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user