diff --git a/discord/abc.py b/discord/abc.py index ef4bbf959..13affae84 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -762,6 +762,13 @@ class GuildChannel: raise TypeError('type field must be of type ChannelType') options['type'] = ch_type.value + try: + status = options.pop('status') + except KeyError: + pass + else: + await self._state.http.edit_voice_channel_status(status, channel_id=self.id, reason=reason) + if options: return await self._state.http.edit_channel(self.id, reason=reason, **options) diff --git a/discord/channel.py b/discord/channel.py index 991d11786..157ebb933 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -1494,6 +1494,7 @@ class VoiceChannel(VocalGuildChannel): rtc_region: Optional[str] = ..., video_quality_mode: VideoQualityMode = ..., slowmode_delay: int = ..., + status: Optional[str] = ..., reason: Optional[str] = ..., ) -> VoiceChannel: ... @@ -1553,6 +1554,11 @@ class VoiceChannel(VocalGuildChannel): The camera video quality for the voice channel's participants. .. versionadded:: 2.0 + status: Optional[:class:`str`] + The new voice channel status. It can be up to 500 characters. + Can be ``None`` to remove the status. + + .. versionadded:: 2.4 Raises ------ diff --git a/discord/http.py b/discord/http.py index 5f79adff3..80c5be160 100644 --- a/discord/http.py +++ b/discord/http.py @@ -1528,6 +1528,13 @@ class HTTPClient: ) -> Response[channel.Channel]: return self.request(Route('PATCH', '/channels/{channel_id}', channel_id=channel_id), reason=reason, json=fields) + def edit_voice_channel_status( + self, status: Optional[str], *, channel_id: int, reason: Optional[str] = None + ) -> Response[None]: + r = Route('PUT', '/channels/{channel_id}/voice-status', channel_id=channel_id) + payload = {'status': status} + return self.request(r, reason=reason, json=payload) + def bulk_channel_update( self, guild_id: Snowflake,