Table of Contents

Method ModifyPositionAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

ModifyPositionAsync(int, string)

Updates the channel position when it doesn't have a category. Use ModifyParentAsync(DiscordChannel, bool?, string) for moving to other categories. Use RemoveParentAsync(string) to move out of a category. Use ModifyPositionInCategoryAsync(int, string) for moving within a category.

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

Parameters

position int

Position the channel should be moved to.

reason string

Reason for audit logs.

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.