Table of Contents

Method CreateGuildAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

CreateGuildAsync(string, string, Optional<Stream>, VerificationLevel?, DefaultMessageNotifications?, SystemChannelFlags?)

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

public Task<DiscordGuild> CreateGuildAsync(string name, string region = null, Optional<Stream> icon = default, VerificationLevel? verificationLevel = null, DefaultMessageNotifications? defaultMessageNotifications = null, SystemChannelFlags? systemChannelFlags = null)

Parameters

name string

Name of the guild.

region string

Voice region of the guild.

icon Optional<Stream>

Stream containing the icon for the guild.

verificationLevel VerificationLevel?

Verification level for the guild.

defaultMessageNotifications DefaultMessageNotifications?

Default message notification settings for the guild.

systemChannelFlags SystemChannelFlags?

System channel flags for the guild.

Returns

Task<DiscordGuild>

The created guild.

Exceptions

NotFoundException

Thrown when the channel does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.