Method GetThreadAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
GetThreadAsync(ulong, bool, CancellationToken)
Gets a thread.
public Task<DiscordThreadChannel> GetThreadAsync(ulong id, bool fetch = false, CancellationToken cancellationToken = default)
Parameters
idulongThe id of the thread to get.
fetchboolWhether to ignore the cache. Defaults to false.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
- Task<DiscordThreadChannel>
The requested thread.
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.