Table of Contents

Class GuildProperties

Namespace
Discord
Assembly
Discord.Net.Core.dll

Provides properties that are used to modify an IGuild with the specified changes.

public class GuildProperties
Inheritance
GuildProperties
Inherited Members

Examples

The following example uses ModifyAsync to apply changes specified in the properties,

var guild = _client.GetGuild(id);
if (guild == null) return;

await guild.ModifyAsync(x =>
{
    x.Name = "VERY Fast Discord Running at Incredible Hihg Speed";
});

Properties

AfkChannel

Gets or sets the IVoiceChannel where AFK users should be sent.

public Optional<IVoiceChannel> AfkChannel { get; set; }

Property Value

Optional<IVoiceChannel>

AfkChannelId

Gets or sets the ID of the IVoiceChannel where AFK users should be sent.

public Optional<ulong?> AfkChannelId { get; set; }

Property Value

Optional<ulong?>

AfkTimeout

Gets or sets how many seconds before a user is sent to AFK. This value MUST be one of: (60, 300, 900, 1800, 3600).

public Optional<int> AfkTimeout { get; set; }

Property Value

Optional<int>

Banner

Gets or sets the banner of the guild.

public Optional<Image?> Banner { get; set; }

Property Value

Optional<Image?>

DefaultMessageNotifications

Gets or sets the default message notification state for the guild.

public Optional<DefaultMessageNotifications> DefaultMessageNotifications { get; set; }

Property Value

Optional<DefaultMessageNotifications>

ExplicitContentFilter

Gets or sets the explicit content filter level of this guild.

public Optional<ExplicitContentFilterLevel> ExplicitContentFilter { get; set; }

Property Value

Optional<ExplicitContentFilterLevel>

Features

Gets or sets the guild features enabled in this guild. Features that are not mutable will be ignored.

public Optional<GuildFeature> Features { get; set; }

Property Value

Optional<GuildFeature>

Icon

Gets or sets the icon of the guild.

public Optional<Image?> Icon { get; set; }

Property Value

Optional<Image?>

IsBoostProgressBarEnabled

Gets or sets if the boost progress bar is enabled.

public Optional<bool> IsBoostProgressBarEnabled { get; set; }

Property Value

Optional<bool>

Name

Gets or sets the name of the guild. Must be within 100 characters.

public Optional<string> Name { get; set; }

Property Value

Optional<string>

Owner

Gets or sets the owner of this guild.

public Optional<IUser> Owner { get; set; }

Property Value

Optional<IUser>

OwnerId

Gets or sets the ID of the owner of this guild.

public Optional<ulong> OwnerId { get; set; }

Property Value

Optional<ulong>

PreferredCulture

Gets or sets the preferred locale of the guild.

public Optional<CultureInfo> PreferredCulture { get; set; }

Property Value

Optional<CultureInfo>

Remarks

The PreferredLocale property takes precedence over this property. When PreferredLocale is set, the value of PreferredCulture will be unused.

PreferredLocale

Gets or sets the preferred locale of the guild in IETF BCP 47 language tag format.

public Optional<string> PreferredLocale { get; set; }

Property Value

Optional<string>

Remarks

This property takes precedence over PreferredCulture. When it is set, the value of PreferredCulture will not be used.

Region

Gets or sets the region for the guild's voice connections.

public Optional<IVoiceRegion> Region { get; set; }

Property Value

Optional<IVoiceRegion>

RegionId

Gets or sets the ID of the region for the guild's voice connections.

public Optional<string> RegionId { get; set; }

Property Value

Optional<string>

SafetyAlertsChannelId

Gets or sets the ID of the safety alerts channel.

public Optional<ulong> SafetyAlertsChannelId { get; set; }

Property Value

Optional<ulong>

Splash

Gets or sets the guild's splash image.

public Optional<Image?> Splash { get; set; }

Property Value

Optional<Image?>

Remarks

The guild must be partnered for this value to have any effect.

SystemChannel

Gets or sets the ITextChannel where system messages should be sent.

public Optional<ITextChannel> SystemChannel { get; set; }

Property Value

Optional<ITextChannel>

SystemChannelFlags

Gets or sets the flags that DISABLE types of system channel messages.

public Optional<SystemChannelMessageDeny> SystemChannelFlags { get; set; }

Property Value

Optional<SystemChannelMessageDeny>

Remarks

These flags are inverted. Setting a flag will disable that system channel message from being sent. A value of None will allow all system channel message types to be sent, given that the SystemChannelId has also been set. A value of GuildBoost will deny guild boost messages from being sent, and allow all other types of messages. Refer to the extension methods GetGuildBoostMessagesEnabled(IGuild),
GetWelcomeMessagesEnabled(IGuild), GetGuildSetupTipMessagesEnabled(IGuild), and GetGuildWelcomeMessageReplyEnabled(IGuild) to check if these system channel message types are enabled, without the need to manipulate the logic of the flag.

SystemChannelId

Gets or sets the ID of the ITextChannel where system messages should be sent.

public Optional<ulong?> SystemChannelId { get; set; }

Property Value

Optional<ulong?>

VerificationLevel

Gets or sets the verification level new users need to achieve before speaking.

public Optional<VerificationLevel> VerificationLevel { get; set; }

Property Value

Optional<VerificationLevel>