Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions DSharpPlus/Entities/Guild/DiscordGuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@ public DiscordChannel AfkChannel
[JsonProperty("system_channel_flags")]
public SystemChannelFlags SystemChannelFlags { get; internal set; }

[JsonProperty("safety_alerts_channel_id")]
internal ulong SafetyAlertsChannelId { get; set; }

/// <summary>
/// Gets the guild's safety alerts channel.
/// </summary>
[JsonIgnore]
public DiscordChannel SafetyAlertsChannel => this.GetChannel(SafetyAlertsChannelId);

/// <summary>
/// Gets whether this guild's widget is enabled.
/// </summary>
Expand Down
13 changes: 9 additions & 4 deletions DSharpPlus/Enums/User/UserFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ public enum UserFlags
TeamUser = 1 << 10,

/// <summary>
/// Whether the user is an official system user.
/// The user reached the second bug hunter tier.
/// </summary>
System = 1 << 12,
BugHunterLevelTwo = 1 << 14,

/// <summary>
/// The user reached the second bug hunter tier.
/// Whether the user is an official system user.
/// </summary>
BugHunterLevelTwo = 1 << 14,
System = 1 << 12,

/// <summary>
/// The user is a verified bot.
Expand All @@ -110,5 +110,10 @@ public enum UserFlags
/// The bot receives interactions via HTTP.
/// </summary>
HttpInteractionsBot = 1 << 19,

/// <summary>
/// The user is an active bot developer.
/// </summary>
ActiveDeveloper = 1 << 22
}
}
25 changes: 25 additions & 0 deletions DSharpPlus/Formatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using System;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using DSharpPlus.Entities;

Expand Down Expand Up @@ -220,5 +221,29 @@ public static string Emoji(DiscordEmoji emoji)
/// <returns></returns>
public static string AttachedImageUrl(string filename)
=> $"attachment://{filename}";

/// <summary>
/// Creates a big header.
/// </summary>
/// <param name="value">Text to display as a big header.</param>
/// <returns>Formatted header.</returns>
public static string ToBigHeader(string value)
=> $"# {value}";

/// <summary>
/// Creates a medium header.
/// </summary>
/// <param name="value">Text to display as a medium header.</param>
/// <returns>Formatted header.</returns>
public static string ToMediumHeader(string value)
=> $"## {value}";

/// <summary>
/// Creates a small header.
/// </summary>
/// <param name="value">Text to display as a small header.</param>
/// <returns>Formatted header.</returns>
public static string ToSmallHeader(string value)
=> $"### {value}";
}
}