Method DeleteTemplateAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
DeleteTemplateAsync(string, CancellationToken)
Deletes the template.
public Task<DiscordGuildTemplate> DeleteTemplateAsync(string code, CancellationToken cancellationToken = default)
Parameters
codestringThe code of the template to delete.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
- Task<DiscordGuildTemplate>
The deleted template.
Exceptions
- NotFoundException
Throws when the template for the code cannot be found
- UnauthorizedException
Throws when the client does not have the ManageGuild permission.
- ServerErrorException
Thrown when Discord is unable to process the request.