@ -84,6 +84,7 @@ if TYPE_CHECKING:
|
||||
from .ui.view import View
|
||||
from .types.channel import (
|
||||
PermissionOverwrite as PermissionOverwritePayload,
|
||||
Channel as ChannelPayload,
|
||||
GuildChannel as GuildChannelPayload,
|
||||
OverwriteType,
|
||||
)
|
||||
@ -302,11 +303,8 @@ class GuildChannel:
|
||||
payload.append(d)
|
||||
|
||||
await http.bulk_channel_update(self.guild.id, payload, reason=reason)
|
||||
self.position = position
|
||||
if parent_id is not _undefined:
|
||||
self.category_id = int(parent_id) if parent_id else None
|
||||
|
||||
async def _edit(self, options: Dict[str, Any], reason: Optional[str]):
|
||||
async def _edit(self, options: Dict[str, Any], reason: Optional[str]) -> Optional[ChannelPayload]:
|
||||
try:
|
||||
parent = options.pop('category')
|
||||
except KeyError:
|
||||
@ -385,8 +383,7 @@ class GuildChannel:
|
||||
options['type'] = ch_type.value
|
||||
|
||||
if options:
|
||||
data = await self._state.http.edit_channel(self.id, reason=reason, **options)
|
||||
self._update(self.guild, data)
|
||||
return await self._state.http.edit_channel(self.id, reason=reason, **options)
|
||||
|
||||
def _fill_overwrites(self, data: GuildChannelPayload) -> None:
|
||||
self._overwrites = []
|
||||
|
Reference in New Issue
Block a user