Method CreateExceptionAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
CreateExceptionAsync(Action<ScheduledEventExceptionCreateModel>, CancellationToken)
Creates an exception for this scheduled event.
public Task<DiscordScheduledEventException> CreateExceptionAsync(Action<ScheduledEventExceptionCreateModel> action, CancellationToken cancellationToken = default)
Parameters
actionAction<ScheduledEventExceptionCreateModel>Action to perform on the exception create model.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
- Task<DiscordScheduledEventException>
The created exception.
Exceptions
- UnauthorizedException
Thrown when the client does not have the correct permissions.
- NotFoundException
Thrown when the event does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.