Table of Contents

Method AddRoleAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

AddRoleAsync(ulong)

Adds a role to this thread. Only applicable to private threads.

public Task AddRoleAsync(ulong roleId)

Parameters

roleId ulong

The role id to be added.

Returns

Task

Exceptions

NotFoundException

Thrown when the thread does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.

AddRoleAsync(DiscordRole)

Adds a role to this thread. Only applicable to private threads.

public Task AddRoleAsync(DiscordRole role)

Parameters

role DiscordRole

The role to be added.

Returns

Task

Exceptions

NotFoundException

Thrown when the thread does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.