From 25e31faa6eaabb0d37da65a8a28b00b1af277f65 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 29 Nov 2016 21:24:49 +0100 Subject: [PATCH 1/6] EmbedAsync extension, ~ani and ~mang are wayyyyy cooler --- .../Searches/Commands/AnimeSearchCommands.cs | 62 +++++++++++++++++-- .../Searches/Commands/Models/AnimeResult.cs | 17 +++-- .../Searches/Commands/Models/MangaResult.cs | 12 +--- src/NadekoBot/_Extensions/Extensions.cs | 15 +++++ 4 files changed, 84 insertions(+), 22 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs index 6563d8cf..a0907ed2 100644 --- a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs @@ -37,9 +37,35 @@ namespace NadekoBot.Modules.Searches if (string.IsNullOrWhiteSpace(query)) return; - var result = await GetAnimeData(query).ConfigureAwait(false); + var animeData = await GetAnimeData(query).ConfigureAwait(false); - await channel.SendMessageAsync(result.ToString() ?? "`No anime found.`").ConfigureAwait(false); + var embed = new Discord.API.Embed() + { + Description = animeData.Synopsis, + Title = animeData.title_english, + Url = animeData.Link, + Image = new Discord.API.EmbedImage() { + Url = animeData.image_url_lge + }, + Fields = new[] { + new Discord.API.EmbedField() { + Inline = true, + Name = "Episodes", + Value = animeData.total_episodes.ToString() + }, + new Discord.API.EmbedField() { + Inline = true, + Name = "Status", + Value = animeData.AiringStatus.ToString() + }, + new Discord.API.EmbedField() { + Inline = true, + Name = "Genres", + Value = String.Join(", ", animeData.Genres) + } + } + }; + await channel.EmbedAsync(embed).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -51,9 +77,37 @@ namespace NadekoBot.Modules.Searches if (string.IsNullOrWhiteSpace(query)) return; - var result = await GetMangaData(query).ConfigureAwait(false); + var animeData = await GetMangaData(query).ConfigureAwait(false); - await channel.SendMessageAsync(result.ToString() ?? "`No manga found.`").ConfigureAwait(false); + var embed = new Discord.API.Embed() + { + Description = animeData.Synopsis, + Title = animeData.title_english, + Url = animeData.Link, + Image = new Discord.API.EmbedImage() + { + Url = animeData.image_url_lge + }, + Fields = new[] { + new Discord.API.EmbedField() { + Inline = true, + Name = "Chapters", + Value = animeData.total_chapters.ToString() + }, + new Discord.API.EmbedField() { + Inline = true, + Name = "Status", + Value = animeData.publishing_status.ToString() + }, + new Discord.API.EmbedField() { + Inline = true, + Name = "Genres", + Value = String.Join(", ", animeData.Genres) + } + } + }; + + await channel.EmbedAsync(embed).ConfigureAwait(false); } private async Task GetAnimeData(string query) diff --git a/src/NadekoBot/Modules/Searches/Commands/Models/AnimeResult.cs b/src/NadekoBot/Modules/Searches/Commands/Models/AnimeResult.cs index d2a6152d..3d08da6e 100644 --- a/src/NadekoBot/Modules/Searches/Commands/Models/AnimeResult.cs +++ b/src/NadekoBot/Modules/Searches/Commands/Models/AnimeResult.cs @@ -1,20 +1,19 @@ -ο»Ώnamespace NadekoBot.Modules.Searches.Models +ο»Ώusing NadekoBot.Extensions; +using System.Globalization; + +namespace NadekoBot.Modules.Searches.Models { public class AnimeResult { public int id; + public string AiringStatus => airing_status.ToTitleCase(); public string airing_status; public string title_english; public int total_episodes; public string description; public string image_url_lge; - - public override string ToString() => - "`Title:` **" + title_english + - "**\n`Status:` " + airing_status + - "\n`Episodes:` " + total_episodes + - "\n`Link:` http://anilist.co/anime/" + id + - "\n`Synopsis:` " + description.Substring(0, description.Length > 500 ? 500 : description.Length) + "..." + - "\n`img:` " + image_url_lge; + public string[] Genres; + public string Link => "http://anilist.co/anime/" + id; + public string Synopsis => description?.Substring(0, description.Length > 500 ? 500 : description.Length) + "..."; } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Searches/Commands/Models/MangaResult.cs b/src/NadekoBot/Modules/Searches/Commands/Models/MangaResult.cs index f5269017..5e262209 100644 --- a/src/NadekoBot/Modules/Searches/Commands/Models/MangaResult.cs +++ b/src/NadekoBot/Modules/Searches/Commands/Models/MangaResult.cs @@ -9,14 +9,8 @@ namespace NadekoBot.Modules.Searches.Models public int total_chapters; public int total_volumes; public string description; - - public override string ToString() => - "`Title:` **" + title_english + - "**\n`Status:` " + publishing_status + - "\n`Chapters:` " + total_chapters + - "\n`Volumes:` " + total_volumes + - "\n`Link:` http://anilist.co/manga/" + id + - "\n`Synopsis:` " + description.Substring(0, description.Length > 500 ? 500 : description.Length) + "..." + - "\n`img:` " + image_url_lge; + public string[] Genres; + public string Link => "http://anilist.co/manga/" + id; + public string Synopsis => description?.Substring(0, description.Length > 500 ? 500 : description.Length) + "..."; } } \ No newline at end of file diff --git a/src/NadekoBot/_Extensions/Extensions.cs b/src/NadekoBot/_Extensions/Extensions.cs index 166e41b0..125d8e03 100644 --- a/src/NadekoBot/_Extensions/Extensions.cs +++ b/src/NadekoBot/_Extensions/Extensions.cs @@ -155,6 +155,9 @@ namespace NadekoBot.Extensions return list.ToArray(); } + public static Task EmbedAsync(this IMessageChannel ch, Discord.API.Embed embed) + => ch.SendMessageAsync("", embed: embed); + public static Task SendTableAsync(this IMessageChannel ch, string seed, IEnumerable items, Func howToPrint, int columns = 3) { var i = 0; @@ -214,6 +217,18 @@ namespace NadekoBot.Extensions return string.Concat(str.Take(maxLength - 3)) + (hideDots ? "" : "..."); } + public static string ToTitleCase(this string str) + { + var tokens = str.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries); + for (var i = 0; i < tokens.Length; i++) + { + var token = tokens[i]; + tokens[i] = token.Substring(0, 1).ToUpper() + token.Substring(1); + } + + return string.Join(" ", tokens); + } + /// /// Removes trailing S or ES (if specified) on the given string if the num is 1 /// From c7b2d753c3e43905088f775c6e74a8f38613f5a2 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 29 Nov 2016 15:26:13 -0500 Subject: [PATCH 2/6] Embed Weather /shrug --- src/NadekoBot/Modules/Searches/Searches.cs | 37 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 82bf2ece..1ae4b5e4 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -42,13 +42,38 @@ namespace NadekoBot.Modules.Searches response = await http.GetStringAsync($"http://api.ninetales.us/nadekobot/weather/?city={city}&country={country}").ConfigureAwait(false); var obj = JObject.Parse(response)["weather"]; + double centiLucy = Double.Parse(obj["feelscentigrade"].ToString()); + uint[] colLucy = { 0x0000FF, 0xADD8E6, 0xFF0000, 0x8A8A8A}; + int colBaby = 0; + if (centiLucy < -49) + { + colBaby = 0; + } else if (centiLucy > -1 && centiLucy < 1) + { + colBaby = 1; + } else if (centiLucy > 49) + { + colBaby = 2; + } else { + colBaby = 3; + } - await channel.SendMessageAsync( -$@"🌍 **Weather for** 【{obj["target"]}】 -πŸ“ **Lat,Long:** ({obj["latitude"]}, {obj["longitude"]}) ☁ **Condition:** {obj["condition"]} -πŸ˜“ **Humidity:** {obj["humidity"]}% πŸ’¨ **Wind Speed:** {obj["windspeedk"]}km/h / {obj["windspeedm"]}mph -🌑 **Temperature:** {obj["centigrade"]}Β°C / {obj["fahrenheit"]}Β°F πŸ”† **Feels like:** {obj["feelscentigrade"]}Β°C / {obj["feelsfahrenheit"]}Β°F -πŸŒ„ **Sunrise:** {obj["sunrise"]} πŸŒ‡ **Sunset:** {obj["sunset"]}").ConfigureAwait(false); + var embed = new EmbedBuilder() + .WithAuthor(eau => eau.WithName("Lucy's Forecast Today") + .WithIconUrl("http://icons.iconarchive.com/icons/wineass/ios7-redesign/512/Weather-icon.png")) + .WithDescription("\0") + .AddField(fb => fb.WithName("🌍 **Weather for:**").WithValue($"{obj["target"]}").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸ“ **Lat,Long:**").WithValue($"{obj["latitude"]}, {obj["longitude"]}").WithIsInline(true)) + .AddField(fb => fb.WithName("☁ **Condition:**").WithValue($"{obj["condition"]}").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸ˜“ **Humidity:**").WithValue($"{obj["humidity"]}%").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸ’¨ **Wind Speed:**").WithValue($"{obj["windspeedk"]}km/h / {obj["windspeedm"]}mph").WithIsInline(true)) + .AddField(fb => fb.WithName("🌑 **Temperature:**").WithValue($"{obj["centigrade"]}Β°C / {obj["fahrenheit"]}Β°F").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸ”† **Feels like:**").WithValue($"{obj["feelscentigrade"]}Β°C / {obj["feelsfahrenheit"]}Β°F").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸŒ„ **Sunrise:**").WithValue($"{obj["sunrise"]}").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸŒ‡ **Sunset:**").WithValue($"{obj["sunset"]}").WithIsInline(true)) + .WithColor(colLucy[colBaby]) + .WithTimestamp(DateTime.Now); + await channel.SendMessageAsync("-", embed: embed.Build()).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] From 2c667c3fe286a85d774c99897340a2f9d3af823d Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 29 Nov 2016 15:27:49 -0500 Subject: [PATCH 3/6] remove color bs bsbs --- src/NadekoBot/Modules/Searches/Searches.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 1ae4b5e4..06e856eb 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -42,21 +42,6 @@ namespace NadekoBot.Modules.Searches response = await http.GetStringAsync($"http://api.ninetales.us/nadekobot/weather/?city={city}&country={country}").ConfigureAwait(false); var obj = JObject.Parse(response)["weather"]; - double centiLucy = Double.Parse(obj["feelscentigrade"].ToString()); - uint[] colLucy = { 0x0000FF, 0xADD8E6, 0xFF0000, 0x8A8A8A}; - int colBaby = 0; - if (centiLucy < -49) - { - colBaby = 0; - } else if (centiLucy > -1 && centiLucy < 1) - { - colBaby = 1; - } else if (centiLucy > 49) - { - colBaby = 2; - } else { - colBaby = 3; - } var embed = new EmbedBuilder() .WithAuthor(eau => eau.WithName("Lucy's Forecast Today") @@ -71,7 +56,6 @@ namespace NadekoBot.Modules.Searches .AddField(fb => fb.WithName("πŸ”† **Feels like:**").WithValue($"{obj["feelscentigrade"]}Β°C / {obj["feelsfahrenheit"]}Β°F").WithIsInline(true)) .AddField(fb => fb.WithName("πŸŒ„ **Sunrise:**").WithValue($"{obj["sunrise"]}").WithIsInline(true)) .AddField(fb => fb.WithName("πŸŒ‡ **Sunset:**").WithValue($"{obj["sunset"]}").WithIsInline(true)) - .WithColor(colLucy[colBaby]) .WithTimestamp(DateTime.Now); await channel.SendMessageAsync("-", embed: embed.Build()).ConfigureAwait(false); } From 156a28f3f478204626d6b682d91cd792a0d3e80e Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 29 Nov 2016 22:00:30 +0100 Subject: [PATCH 4/6] changed links --- src/NadekoBot/Modules/Help/Help.cs | 4 ++-- src/NadekoBot/Resources/CommandStrings.Designer.cs | 2 +- src/NadekoBot/Resources/CommandStrings.resx | 2 +- src/NadekoBot/Services/Database/Models/BotConfig.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index c026e996..11dd9437 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -156,8 +156,8 @@ You can support the project on patreon: or paypa var channel = (ITextChannel)umsg.Channel; await channel.SendMessageAsync( -@"**LIST OF COMMANDS**: -**Hosting Guides and docs can be found here**: ").ConfigureAwait(false); +@"**LIST OF COMMANDS**: +**Hosting Guides and docs can be found here**: ").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Resources/CommandStrings.Designer.cs b/src/NadekoBot/Resources/CommandStrings.Designer.cs index f534b0c8..d64bce83 100644 --- a/src/NadekoBot/Resources/CommandStrings.Designer.cs +++ b/src/NadekoBot/Resources/CommandStrings.Designer.cs @@ -96,7 +96,7 @@ namespace NadekoBot.Resources { } /// - /// Looks up a localized string similar to Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: <http://nadekobot.readthedocs.io/en/1.0/Custom%20Reactions/>. + /// Looks up a localized string similar to Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: <http://nadekobot.readthedocs.io/en/latest/Custom%20Reactions/>. /// public static string addcustreact_desc { get { diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index 010bc1aa..e2df60fe 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -427,7 +427,7 @@ addcustreact acr - Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: <http://nadekobot.readthedocs.io/en/1.0/Custom%20Reactions/> + Add a custom reaction with a trigger and a response. Running this command in server requires Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: <http://nadekobot.readthedocs.io/en/latest/Custom%20Reactions/> `{0}acr "hello" Hi there %user%` diff --git a/src/NadekoBot/Services/Database/Models/BotConfig.cs b/src/NadekoBot/Services/Database/Models/BotConfig.cs index e8216c7e..b20263c8 100644 --- a/src/NadekoBot/Services/Database/Models/BotConfig.cs +++ b/src/NadekoBot/Services/Database/Models/BotConfig.cs @@ -36,7 +36,7 @@ For a specific command help, use `{1}h CommandName` (for example {1}h !!q) **LIST OF COMMANDS CAN BE FOUND ON THIS LINK** - + Nadeko Support Server: https://discord.gg/0ehQwTK2RBjAxzEY"; From fff834f9dbf91d38812f40ce3948a3831ebc8130 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 29 Nov 2016 22:37:27 +0100 Subject: [PATCH 5/6] Weather changed a bit --- src/NadekoBot/Modules/Searches/Searches.cs | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 06e856eb..1076e96d 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -44,20 +44,16 @@ namespace NadekoBot.Modules.Searches var obj = JObject.Parse(response)["weather"]; var embed = new EmbedBuilder() - .WithAuthor(eau => eau.WithName("Lucy's Forecast Today") - .WithIconUrl("http://icons.iconarchive.com/icons/wineass/ios7-redesign/512/Weather-icon.png")) - .WithDescription("\0") - .AddField(fb => fb.WithName("🌍 **Weather for:**").WithValue($"{obj["target"]}").WithIsInline(true)) - .AddField(fb => fb.WithName("πŸ“ **Lat,Long:**").WithValue($"{obj["latitude"]}, {obj["longitude"]}").WithIsInline(true)) - .AddField(fb => fb.WithName("☁ **Condition:**").WithValue($"{obj["condition"]}").WithIsInline(true)) - .AddField(fb => fb.WithName("πŸ˜“ **Humidity:**").WithValue($"{obj["humidity"]}%").WithIsInline(true)) - .AddField(fb => fb.WithName("πŸ’¨ **Wind Speed:**").WithValue($"{obj["windspeedk"]}km/h / {obj["windspeedm"]}mph").WithIsInline(true)) - .AddField(fb => fb.WithName("🌑 **Temperature:**").WithValue($"{obj["centigrade"]}Β°C / {obj["fahrenheit"]}Β°F").WithIsInline(true)) - .AddField(fb => fb.WithName("πŸ”† **Feels like:**").WithValue($"{obj["feelscentigrade"]}Β°C / {obj["feelsfahrenheit"]}Β°F").WithIsInline(true)) - .AddField(fb => fb.WithName("πŸŒ„ **Sunrise:**").WithValue($"{obj["sunrise"]}").WithIsInline(true)) - .AddField(fb => fb.WithName("πŸŒ‡ **Sunset:**").WithValue($"{obj["sunset"]}").WithIsInline(true)) - .WithTimestamp(DateTime.Now); - await channel.SendMessageAsync("-", embed: embed.Build()).ConfigureAwait(false); + .AddField(fb => fb.WithName("🌍 Location").WithValue($"{obj["target"]}").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸ“ Lat,Long").WithValue($"{obj["latitude"]}, {obj["longitude"]}").WithIsInline(true)) + .AddField(fb => fb.WithName("☁ Condition").WithValue($"{obj["condition"]}").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸ˜“ Humidity").WithValue($"{obj["humidity"]}%").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸ’¨ Wind Speed").WithValue($"{obj["windspeedk"]}km/h / {obj["windspeedm"]}mph").WithIsInline(true)) + .AddField(fb => fb.WithName("🌑 Temperature").WithValue($"{obj["centigrade"]}Β°C / {obj["fahrenheit"]}Β°F").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸ”† Feels like").WithValue($"{obj["feelscentigrade"]}Β°C / {obj["feelsfahrenheit"]}Β°F").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸŒ„ Sunrise").WithValue($"{obj["sunrise"]}").WithIsInline(true)) + .AddField(fb => fb.WithName("πŸŒ‡ Sunset").WithValue($"{obj["sunset"]}").WithIsInline(true)); + await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] From 2099a0266a0f0453b8dbd076bab945b0cca2fdab Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 30 Nov 2016 02:28:51 +0100 Subject: [PATCH 6/6] Show green color with OK embed responses --- .../Modules/Searches/Commands/AnimeSearchCommands.cs | 7 +++++-- src/NadekoBot/Modules/Searches/Searches.cs | 3 ++- src/NadekoBot/NadekoBot.cs | 3 +++ src/NadekoBot/_Extensions/Extensions.cs | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs index a0907ed2..8571846b 100644 --- a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs @@ -1,4 +1,5 @@ ο»Ώusing Discord; +using Discord.API; using Discord.Commands; using NadekoBot.Attributes; using NadekoBot.Extensions; @@ -63,7 +64,8 @@ namespace NadekoBot.Modules.Searches Name = "Genres", Value = String.Join(", ", animeData.Genres) } - } + }, + Color = NadekoBot.OkColor }; await channel.EmbedAsync(embed).ConfigureAwait(false); } @@ -104,7 +106,8 @@ namespace NadekoBot.Modules.Searches Name = "Genres", Value = String.Join(", ", animeData.Genres) } - } + }, + Color = NadekoBot.OkColor }; await channel.EmbedAsync(embed).ConfigureAwait(false); diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 1076e96d..dd5e7808 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -52,7 +52,8 @@ namespace NadekoBot.Modules.Searches .AddField(fb => fb.WithName("🌑 Temperature").WithValue($"{obj["centigrade"]}Β°C / {obj["fahrenheit"]}Β°F").WithIsInline(true)) .AddField(fb => fb.WithName("πŸ”† Feels like").WithValue($"{obj["feelscentigrade"]}Β°C / {obj["feelsfahrenheit"]}Β°F").WithIsInline(true)) .AddField(fb => fb.WithName("πŸŒ„ Sunrise").WithValue($"{obj["sunrise"]}").WithIsInline(true)) - .AddField(fb => fb.WithName("πŸŒ‡ Sunset").WithValue($"{obj["sunset"]}").WithIsInline(true)); + .AddField(fb => fb.WithName("πŸŒ‡ Sunset").WithValue($"{obj["sunset"]}").WithIsInline(true)) + .WithColor(NadekoBot.OkColor); await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); } diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 2d0be0ab..a0d80f36 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -23,6 +23,9 @@ namespace NadekoBot public class NadekoBot { private Logger _log; + + public static uint OkColor { get; } = 0x00ff00; + public static uint ErrorColor { get; } = 0xff0000; public static CommandService CommandService { get; private set; } public static CommandHandler CommandHandler { get; private set; } diff --git a/src/NadekoBot/_Extensions/Extensions.cs b/src/NadekoBot/_Extensions/Extensions.cs index 125d8e03..dc330324 100644 --- a/src/NadekoBot/_Extensions/Extensions.cs +++ b/src/NadekoBot/_Extensions/Extensions.cs @@ -1,4 +1,5 @@ ο»Ώusing Discord; +using Discord.API; using Discord.WebSocket; using ImageSharp; using Newtonsoft.Json;