Browse Source

`ForumTag` inherits `ISnowflakeEntity`

pull/2469/head
Misha133 2 years ago
parent
commit
35a93960f3
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/Discord.Net.Core/Entities/ForumTag.cs

+ 6
- 1
src/Discord.Net.Core/Entities/ForumTag.cs View File

@@ -9,7 +9,7 @@ namespace Discord
/// <summary>
/// A struct representing a forum channel tag.
/// </summary>
public struct ForumTag
public struct ForumTag : ISnowflakeEntity
{
/// <summary>
/// Gets the Id of the tag.
@@ -32,6 +32,11 @@ namespace Discord
/// </summary>
public bool Moderated { get; }

/// <summary>
/// Gets when the tag was created.
/// </summary>
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);

internal ForumTag(ulong id, string name, ulong? emojiId, string emojiName, bool moderated)
{
if (emojiId.HasValue && emojiId.Value != 0)


Loading…
Cancel
Save