Add support for setting voice channel status

This commit is contained in:
Andrin
2023-12-26 11:32:21 +01:00
committed by GitHub
parent d25b574b32
commit 9ce733321b
3 changed files with 20 additions and 0 deletions

View File

@ -500,6 +500,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)