[Feature] Guild incident actions (#2783)
* initial commit * <see langword="null"/> notes
This commit is contained in:
@@ -143,6 +143,8 @@ namespace Discord.WebSocket
|
||||
public bool IsBoostProgressBarEnabled { get; private set; }
|
||||
/// <inheritdoc />
|
||||
public GuildFeatures Features { get; private set; }
|
||||
/// <inheritdoc/>
|
||||
public GuildIncidentsData IncidentsData { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
|
||||
@@ -560,6 +562,9 @@ namespace Discord.WebSocket
|
||||
PreferredCulture = PreferredLocale == null ? null : new CultureInfo(PreferredLocale);
|
||||
if (model.IsBoostProgressBarEnabled.IsSpecified)
|
||||
IsBoostProgressBarEnabled = model.IsBoostProgressBarEnabled.Value;
|
||||
IncidentsData = model.IncidentsData is not null
|
||||
? new GuildIncidentsData { DmsDisabledUntil = model.IncidentsData.DmsDisabledUntil, InvitesDisabledUntil = model.IncidentsData.InvitesDisabledUntil }
|
||||
: new GuildIncidentsData();
|
||||
if (model.Emojis != null)
|
||||
{
|
||||
var emojis = ImmutableArray.CreateBuilder<GuildEmote>(model.Emojis.Length);
|
||||
@@ -656,6 +661,11 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc />
|
||||
public Task LeaveAsync(RequestOptions options = null)
|
||||
=> GuildHelper.LeaveAsync(this, Discord, options);
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<GuildIncidentsData> ModifyIncidentActionsAsync(Action<GuildIncidentsDataProperties> props, RequestOptions options = null)
|
||||
=> GuildHelper.ModifyGuildIncidentActionsAsync(this, Discord, props, options);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Bans
|
||||
|
||||
Reference in New Issue
Block a user