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
ulongThe role id to be added.
Returns
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
DiscordRoleThe role to be added.
Returns
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.