mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add missing param send_start_notification to create_instance
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user