Table of Contents

Method ModifyPositionAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

ModifyPositionAsync(int, string, bool?, ulong?)

Updates the channel position

public Task ModifyPositionAsync(int position, string reason = null, bool? lockPermissions = null, ulong? parentId = null)

Parameters

position int

Position the channel should be moved to.

reason string

Reason for audit logs.

lockPermissions bool?

Whether to sync channel permissions with the parent, if moving to a new category.

parentId ulong?

The new parent ID if the channel is to be moved to a new category.

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.