Method CreateTemplateAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
CreateTemplateAsync(string, string?)
Creates a guild template.
public Task<DiscordGuildTemplate> CreateTemplateAsync(string name, string? description = null)
Parameters
name
stringName of the template.
description
stringDescription of the template.
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.