Method ModifyPositionAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
ModifyPositionAsync(int, string, CancellationToken)
Updates the channel position when it doesn't have a category. Use ModifyParentAsync(DiscordChannel, bool?, string, CancellationToken) for moving to other categories. Use RemoveParentAsync(string, CancellationToken) to move out of a category. Use ModifyPositionInCategoryAsync(int, string, CancellationToken) for moving within a category.
public Task ModifyPositionAsync(int position, string reason = null, CancellationToken cancellationToken = default)
Parameters
positionintPosition the channel should be moved to.
reasonstringReason for audit logs.
cancellationTokenCancellationTokenA token to cancel the request.
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.