From 2099a0266a0f0453b8dbd076bab945b0cca2fdab Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 30 Nov 2016 02:28:51 +0100 Subject: [PATCH] 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;