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
stringName of the guild.
region
stringVoice 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.