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
enabledboolIf true, enables HasCommunityEnabled.
rulesChannelDiscordChannelThe rules channel.
publicUpdatesChannelDiscordChannelThe public updates channel.
preferredLocalestringThe preferred locale. Defaults to en-US.
descriptionstringThe description.
defaultMessageNotificationsDefaultMessageNotificationsThe default message notifications. Defaults to MentionsOnly
reasonstringThe 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.