Method ModifyParentAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
ModifyParentAsync(DiscordChannel, bool?, string)
Updates the channel parent, moving the channel to the bottom of the new category.
public Task ModifyParentAsync(DiscordChannel newParent, bool? lockPermissions = null, string reason = null)
Parameters
newParent
DiscordChannelNew parent for channel. Use RemoveParentAsync(string) to remove from parent.
lockPermissions
bool?Sync permissions with parent. Defaults to null.
reason
stringReason for audit logs.
Returns
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageChannels permission.
- NotFoundException
Thrown when the channel does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.