Method CreateTemplateAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
CreateTemplateAsync(string, string?)
Creates a guild template.
public Task<DiscordGuildTemplate> CreateTemplateAsync(string name, string? description = null)
Parameters
Returns
- Task<DiscordGuildTemplate>
The template created.
Exceptions
- BadRequestException
Throws when a template already exists for the guild or a null parameter is provided for the name.
- UnauthorizedException
Throws when the client does not have the ManageGuild permission.
- ServerErrorException
Thrown when Discord is unable to process the request.