From 773743938cf47afcf5e11106cc830ca7c468c1fb Mon Sep 17 00:00:00 2001 From: Gehongyan Date: Thu, 19 Jan 2023 11:04:26 +0800 Subject: [PATCH] Moves TextColor to TextTheme --- .../Messages/Cards/{TextColor.cs => Elements/TextTheme.cs} | 4 ++-- src/Kook.Net.Core/Format.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/Kook.Net.Core/Entities/Messages/Cards/{TextColor.cs => Elements/TextTheme.cs} (64%) diff --git a/src/Kook.Net.Core/Entities/Messages/Cards/TextColor.cs b/src/Kook.Net.Core/Entities/Messages/Cards/Elements/TextTheme.cs similarity index 64% rename from src/Kook.Net.Core/Entities/Messages/Cards/TextColor.cs rename to src/Kook.Net.Core/Entities/Messages/Cards/Elements/TextTheme.cs index 7cd50a9d..67def9a6 100644 --- a/src/Kook.Net.Core/Entities/Messages/Cards/TextColor.cs +++ b/src/Kook.Net.Core/Entities/Messages/Cards/Elements/TextTheme.cs @@ -1,9 +1,9 @@ namespace Kook; /// -/// Represents text colors used in . +/// Represents text themes used in . /// -public enum TextColor : ushort +public enum TextTheme : ushort { Primary, Success, diff --git a/src/Kook.Net.Core/Format.cs b/src/Kook.Net.Core/Format.cs index 4893ee6c..52f39d9a 100644 --- a/src/Kook.Net.Core/Format.cs +++ b/src/Kook.Net.Core/Format.cs @@ -22,14 +22,14 @@ public static class Format /// Returns a markdown-formatted string with strike-through formatting. public static string Strikethrough(string text) => $"~~{text}~~"; - /// Returns a markdown-formatted string colored with the specified . + /// Returns a markdown-formatted string colored with the specified . /// /// /// Colored text is only supported in cards. /// /// - public static string Colorize(string text, TextColor color) => - $"(font){text}(font)[{color.ToString().ToLowerInvariant()}]"; + public static string Colorize(string text, TextTheme theme) => + $"(font){text}(font)[{theme.ToString().ToLowerInvariant()}]"; /// Returns a markdown-formatted URL. public static string Url(string text, string url) => $"[{text}]({url})";