Table of Contents

Method CreateGuildFromTemplateAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

CreateGuildFromTemplateAsync(string, string, Optional<Stream>)

Creates a guild from a template. This requires the bot to be in less than 10 guilds total.

public Task<DiscordGuild> CreateGuildFromTemplateAsync(string code, string name, Optional<Stream> icon = default)

Parameters

code string

The template code.

name string

Name of the guild.

icon Optional<Stream>

Stream containing the icon for the guild.

Returns

Task<DiscordGuild>

The created guild.

Exceptions

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.