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
boolIf true, enables HasCommunityEnabled.
rulesChannel
DiscordChannelThe rules channel.
publicUpdatesChannel
DiscordChannelThe public updates channel.
preferredLocale
stringThe preferred locale. Defaults to en-US.
description
stringThe description.
defaultMessageNotifications
DefaultMessageNotificationsThe default message notifications. Defaults to MentionsOnly
reason
stringThe audit log reason.
Returns
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.