Table of Contents

Method ModifyCommunitySettingsAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

ModifyCommunitySettingsAsync(bool, DiscordChannel, DiscordChannel, string, string, DefaultMessageNotifications, string?)

Modifies the community settings async. This sets High if not highest and AllMembers.

public Task<DiscordGuild> ModifyCommunitySettingsAsync(bool enabled, DiscordChannel rulesChannel, DiscordChannel publicUpdatesChannel, string preferredLocale = "en-US", string description = null, DefaultMessageNotifications defaultMessageNotifications = DefaultMessageNotifications.MentionsOnly, string? reason = null)

Parameters

enabled bool

If true, enables HasCommunityEnabled.

rulesChannel DiscordChannel

The rules channel.

publicUpdatesChannel DiscordChannel

The public updates channel.

preferredLocale string

The preferred locale. Defaults to en-US.

description string

The description.

defaultMessageNotifications DefaultMessageNotifications

The default message notifications. Defaults to MentionsOnly

reason string

The audit log reason.

Returns

Task<DiscordGuild>

Exceptions

UnauthorizedException

Thrown when the client does not have the Administrator permission.

NotFoundException

Thrown when the guild does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.