You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
778 B
26 lines
778 B
4 years ago
|
using System.Diagnostics;
|
||
|
using Model = Discord.API.GuildEmbed;
|
||
|
|
||
|
namespace Discord.Rest
|
||
|
{
|
||
|
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
|
||
|
public struct RestGuildEmbed
|
||
|
{
|
||
|
public bool IsEnabled { get; private set; }
|
||
|
public ulong? ChannelId { get; private set; }
|
||
|
|
||
|
internal RestGuildEmbed(bool isEnabled, ulong? channelId)
|
||
|
{
|
||
|
ChannelId = channelId;
|
||
|
IsEnabled = isEnabled;
|
||
|
}
|
||
|
internal static RestGuildEmbed Create(Model model)
|
||
|
{
|
||
|
return new RestGuildEmbed(model.Enabled, model.ChannelId);
|
||
|
}
|
||
|
|
||
|
public override string ToString() => ChannelId?.ToString() ?? "Unknown";
|
||
|
private string DebuggerDisplay => $"{ChannelId} ({(IsEnabled ? "Enabled" : "Disabled")})";
|
||
|
}
|
||
|
}
|