Added DefaultMessageNotifications
This commit is contained in:
@@ -36,5 +36,7 @@ namespace Discord.API
|
|||||||
public string[] Features { get; set; }
|
public string[] Features { get; set; }
|
||||||
[JsonProperty("mfa_level")]
|
[JsonProperty("mfa_level")]
|
||||||
public MfaLevel MfaLevel { get; set; }
|
public MfaLevel MfaLevel { get; set; }
|
||||||
|
[JsonProperty("default_message_notifications")]
|
||||||
|
public DefaultMessageNotifications DefaultMessageNotifications { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -543,7 +543,6 @@ namespace Discord.API
|
|||||||
Preconditions.NotNullOrEmpty(args.Name, nameof(args.Name));
|
Preconditions.NotNullOrEmpty(args.Name, nameof(args.Name));
|
||||||
Preconditions.GreaterThan(args.OwnerId, 0, nameof(args.OwnerId));
|
Preconditions.GreaterThan(args.OwnerId, 0, nameof(args.OwnerId));
|
||||||
Preconditions.NotNull(args.Region, nameof(args.Region));
|
Preconditions.NotNull(args.Region, nameof(args.Region));
|
||||||
Preconditions.AtLeast(args.VerificationLevel, 0, nameof(args.VerificationLevel));
|
|
||||||
|
|
||||||
return await SendAsync<Guild>("PATCH", $"guilds/{guildId}", args, options: options).ConfigureAwait(false);
|
return await SendAsync<Guild>("PATCH", $"guilds/{guildId}", args, options: options).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace Discord
|
||||||
|
{
|
||||||
|
public enum DefaultMessageNotifications
|
||||||
|
{
|
||||||
|
/// <summary> By default, only mentions will trigger notifications. </summary>
|
||||||
|
MentionsOnly = 0,
|
||||||
|
/// <summary> By default, all messages will trigger notifications. </summary>
|
||||||
|
AllMessages = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,6 +24,7 @@ namespace Discord
|
|||||||
public bool IsEmbeddable { get; private set; }
|
public bool IsEmbeddable { get; private set; }
|
||||||
public VerificationLevel VerificationLevel { get; private set; }
|
public VerificationLevel VerificationLevel { get; private set; }
|
||||||
public MfaLevel MfaLevel { get; private set; }
|
public MfaLevel MfaLevel { get; private set; }
|
||||||
|
public DefaultMessageNotifications DefaultMessageNotifications { get; private set; }
|
||||||
|
|
||||||
public override DiscordClient Discord { get; }
|
public override DiscordClient Discord { get; }
|
||||||
public ulong? AFKChannelId { get; private set; }
|
public ulong? AFKChannelId { get; private set; }
|
||||||
@@ -62,6 +63,7 @@ namespace Discord
|
|||||||
_splashId = model.Splash;
|
_splashId = model.Splash;
|
||||||
VerificationLevel = model.VerificationLevel;
|
VerificationLevel = model.VerificationLevel;
|
||||||
MfaLevel = model.MfaLevel;
|
MfaLevel = model.MfaLevel;
|
||||||
|
DefaultMessageNotifications = model.DefaultMessageNotifications;
|
||||||
|
|
||||||
if (model.Emojis != null)
|
if (model.Emojis != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ namespace Discord
|
|||||||
int AFKTimeout { get; }
|
int AFKTimeout { get; }
|
||||||
/// <summary> Returns true if this guild is embeddable (e.g. widget) </summary>
|
/// <summary> Returns true if this guild is embeddable (e.g. widget) </summary>
|
||||||
bool IsEmbeddable { get; }
|
bool IsEmbeddable { get; }
|
||||||
|
/// <summary> Gets the default message notifications for users who haven't explicitly set their notification settings. </summary>
|
||||||
|
DefaultMessageNotifications DefaultMessageNotifications { get; }
|
||||||
|
/// <summary> Gets the level of mfa requirements a user must fulfill before being allowed to perform administrative actions in this guild. </summary>
|
||||||
|
MfaLevel MfaLevel { get; }
|
||||||
/// <summary> Gets the level of requirements a user must fulfill before being allowed to post messages in this guild. </summary>
|
/// <summary> Gets the level of requirements a user must fulfill before being allowed to post messages in this guild. </summary>
|
||||||
VerificationLevel VerificationLevel { get; }
|
VerificationLevel VerificationLevel { get; }
|
||||||
/// <summary> Returns the url to this guild's icon, or null if one is not set. </summary>
|
/// <summary> Returns the url to this guild's icon, or null if one is not set. </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user