From dc9fb1fd84914df64576264d9cf6c151e768fefb Mon Sep 17 00:00:00 2001 From: Puncher <65789180+Puncher1@users.noreply.github.com> Date: Tue, 7 Mar 2023 02:15:22 +0100 Subject: [PATCH] Add missing param send_start_notification to create_instance --- discord/channel.py | 14 +++++++++++++- discord/http.py | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/discord/channel.py b/discord/channel.py index 6cd74c71a..3c93832f3 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -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) diff --git a/discord/http.py b/discord/http.py index 5e8d32dcd..86b871650 100644 --- a/discord/http.py +++ b/discord/http.py @@ -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}