Added DebuggerDisplay/ToString to Emoji and GuildEmbed
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics;
|
||||
using Model = Discord.API.Emoji;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
|
||||
public struct Emoji
|
||||
{
|
||||
public ulong Id { get; }
|
||||
@@ -19,5 +21,8 @@ namespace Discord
|
||||
RequireColons = model.RequireColons;
|
||||
RoleIds = ImmutableArray.Create(model.Roles);
|
||||
}
|
||||
|
||||
public override string ToString() => Name;
|
||||
private string DebuggerDisplay => $"{Name} ({Id})";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using Model = Discord.API.GuildEmbed;
|
||||
using System.Diagnostics;
|
||||
using Model = Discord.API.GuildEmbed;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
|
||||
public struct GuildEmbed
|
||||
{
|
||||
public bool IsEnabled { get; private set; }
|
||||
@@ -14,5 +16,8 @@ namespace Discord
|
||||
}
|
||||
internal GuildEmbed(Model model)
|
||||
: this(model.Enabled, model.ChannelId) { }
|
||||
|
||||
public override string ToString() => ChannelId?.ToString();
|
||||
private string DebuggerDisplay => $"{ChannelId} ({(IsEnabled ? "Enabled" : "Disabled")})";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user