Table of Contents

Method ModifyPositionInCategoryAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

ModifyPositionInCategoryAsync(int, string)

Updates the channel position within it's own category. Use ModifyParentAsync(DiscordChannel, bool?, string) for moving to other categories. Use RemoveParentAsync(string) to move out of a category. Use ModifyPositionAsync(int, string) to move channels outside a category.

public Task ModifyPositionInCategoryAsync(int position, string reason = null)

Parameters

position int

The position.

reason string

The reason.

Returns

Task

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.

IndexOutOfRangeException

Thrown when position is out of range.

ArgumentException

Thrown when function is called on a channel without a parent channel.