Merge pull request #846 from samdivaio/dev

Update
This commit is contained in:
Master Kwoth 2016-12-03 23:29:00 +01:00 committed by GitHub
commit a788c27468
5 changed files with 34 additions and 15 deletions

View File

@ -88,16 +88,35 @@ namespace NadekoBot.Modules.Help
if (com == null) if (com == null)
{ {
await channel.SendMessageAsync("🔍 **I can't find that command.**"); //await channel.SendMessageAsync("🔍 **I can't find that command.**");
var erro = new EmbedBuilder()
.WithAuthor(eau => eau.WithName("Sorry!")
.WithUrl("http://nadekobot.readthedocs.io/en/latest/Commands%20List/")
.WithIconUrl(NadekoBot.Client.GetCurrentUser().AvatarUrl))
//.WithTitle("Sorry!")
.WithDescription("I can't find that command. Please check the **command** and **command prefix** before trying again.")
.WithColor(NadekoBot.ErrorColor);
await channel.EmbedAsync(erro.Build());
return; return;
} }
var str = $"**__Help for:__ `{com.Text}`**"; var str = $"{com.Text}";
var alias = com.Aliases.Skip(1).FirstOrDefault(); var alias = com.Aliases.Skip(1).FirstOrDefault();
if (alias != null) if (alias != null)
str += $" / `{alias}`"; str += $" / `{alias}`";
var embed = new EmbedBuilder()
.WithAuthor(eau => eau.WithName("Help")
.WithUrl("http://nadekobot.readthedocs.io/en/latest/Commands%20List/")
.WithIconUrl(NadekoBot.Client.GetCurrentUser().AvatarUrl))
//.WithTitle(str)
//.WithDescription($"{ string.Format(com.Summary, com.Module.Prefix)}{ GetCommandRequirements(com)}")
.AddField(fb => fb.WithIndex(1).WithName("**Command**").WithValue(str).WithIsInline(true))
.AddField(fb => fb.WithIndex(2).WithName("**Usage**").WithValue($"{string.Format(com.Remarks, com.Module.Prefix)}").WithIsInline(true))
.AddField(fb => fb.WithIndex(3).WithName("Description").WithValue($"{ string.Format(com.Summary, com.Module.Prefix)}{ GetCommandRequirements(com)}").WithIsInline(false))
.WithColor(NadekoBot.OkColor);
if (com != null) if (com != null)
await channel.SendMessageAsync(str + $@"{Environment.NewLine}**Desc:** {string.Format(com.Summary, com.Module.Prefix)} {GetCommandRequirements(com)} await channel.EmbedAsync(embed.Build()).ConfigureAwait(false);
**Usage:** {string.Format(com.Remarks, com.Module.Prefix)}").ConfigureAwait(false); //await channel.SendMessageAsync(str + $@"{Environment.NewLine}**Desc:** {string.Format(com.Summary, com.Module.Prefix)} {GetCommandRequirements(com)}
//**Usage:** {string.Format(com.Remarks, com.Module.Prefix)}").ConfigureAwait(false);
} }
private string GetCommandRequirements(Command cmd) private string GetCommandRequirements(Command cmd)

View File

@ -303,10 +303,10 @@ namespace NadekoBot.Modules.Searches
} }
if (!removed) if (!removed)
{ {
await channel.SendMessageAsync(":anger: No such stream.").ConfigureAwait(false); await channel.SendMessageAsync(" No such stream.").ConfigureAwait(false);
return; return;
} }
await channel.SendMessageAsync($":ok: Removed `{username}`'s stream ({type}) from notifications.").ConfigureAwait(false); await channel.SendMessageAsync($"🗑 Removed `{username}`'s stream ({type}) from notifications.").ConfigureAwait(false);
} }
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
@ -358,7 +358,7 @@ namespace NadekoBot.Modules.Searches
} }
catch catch
{ {
await channel.SendMessageAsync(":anger: Stream probably doesn't exist.").ConfigureAwait(false); await channel.SendMessageAsync("💢 Stream probably doesn't exist.").ConfigureAwait(false);
return; return;
} }
@ -370,7 +370,7 @@ namespace NadekoBot.Modules.Searches
await uow.CompleteAsync().ConfigureAwait(false); await uow.CompleteAsync().ConfigureAwait(false);
} }
var msg = $":ok: I will notify this channel when status changes."; var msg = $"🆗 I will notify this channel when status changes.";
await channel.EmbedAsync(fs.GetEmbed(status).Build(), msg).ConfigureAwait(false); await channel.EmbedAsync(fs.GetEmbed(status).Build(), msg).ConfigureAwait(false);
} }
} }

View File

@ -48,9 +48,9 @@ namespace NadekoBot.Modules.Searches
.AddField(fb => fb.WithName("📏 Lat,Long").WithValue($"{obj["latitude"]}, {obj["longitude"]}").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("☁ Condition").WithValue($"{obj["condition"]}").WithIsInline(true))
.AddField(fb => fb.WithName("😓 Humidity").WithValue($"{obj["humidity"]}%").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("💨 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("🌡 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("🔆 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("🌄 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); .WithColor(NadekoBot.OkColor);

View File

@ -222,7 +222,7 @@ namespace NadekoBot.Modules.Utility
}, },
}, },
Color = NadekoBot.OkColor Color = 0x00bbd6
}); });
} }

View File

@ -24,8 +24,8 @@ namespace NadekoBot
{ {
private Logger _log; private Logger _log;
public static uint OkColor { get; } = 0x00ff00; public static uint OkColor { get; } = 0x71cd40;
public static uint ErrorColor { get; } = 0xff0000; public static uint ErrorColor { get; } = 0xee281f;
public static CommandService CommandService { get; private set; } public static CommandService CommandService { get; private set; }
public static CommandHandler CommandHandler { get; private set; } public static CommandHandler CommandHandler { get; private set; }