Merge pull request #851 from samdivaio/dev
Better formating of some output
This commit is contained in:
commit
46cf6807fe
@ -99,19 +99,19 @@ namespace NadekoBot.Modules.Help
|
||||
await channel.EmbedAsync(erro.Build());
|
||||
return;
|
||||
}
|
||||
var str = $"{com.Text}";
|
||||
var str = $"**`{com.Text}`**";
|
||||
var alias = com.Aliases.Skip(1).FirstOrDefault();
|
||||
if (alias != null)
|
||||
str += $" / `{alias}`";
|
||||
str += $" **/** **`{alias}`**";
|
||||
var embed = new EmbedBuilder()
|
||||
.WithAuthor(eau => eau.WithName("Help")
|
||||
.WithAuthor(eau => eau.WithName("Command")
|
||||
.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))
|
||||
.AddField(fb => fb.WithIndex(1).WithName(str).WithValue($"{ string.Format(com.Summary, com.Module.Prefix)} { GetCommandRequirements(com)}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithIndex(2).WithName("**Usage**").WithValue($"{string.Format(com.Remarks, com.Module.Prefix)}").WithIsInline(false))
|
||||
//.AddField(fb => fb.WithIndex(3).WithName("**Description**").WithValue($"{ string.Format(com.Summary, com.Module.Prefix)}{ GetCommandRequirements(com)}").WithIsInline(true))
|
||||
.WithColor(NadekoBot.OkColor);
|
||||
if (com != null)
|
||||
await channel.EmbedAsync(embed.Build()).ConfigureAwait(false);
|
||||
|
@ -44,15 +44,15 @@ namespace NadekoBot.Modules.Searches
|
||||
var obj = JObject.Parse(response)["weather"];
|
||||
|
||||
var embed = new EmbedBuilder()
|
||||
.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))
|
||||
.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))
|
||||
.WithColor(NadekoBot.OkColor);
|
||||
await channel.EmbedAsync(embed.Build()).ConfigureAwait(false);
|
||||
}
|
||||
|
@ -176,48 +176,48 @@ namespace NadekoBot.Modules.Utility
|
||||
},
|
||||
Fields = new[] {
|
||||
new EmbedField() {
|
||||
Name = "Author",
|
||||
Name = Format.Bold("Author"),
|
||||
Value = stats.Author,
|
||||
Inline = true
|
||||
},
|
||||
new EmbedField() {
|
||||
Name = "Library",
|
||||
Name = Format.Bold("Library"),
|
||||
Value = stats.Library,
|
||||
Inline = true
|
||||
},
|
||||
new EmbedField() {
|
||||
Name = "Bot ID",
|
||||
Name = Format.Bold("Bot ID"),
|
||||
Value = NadekoBot.Client.GetCurrentUser().Id.ToString(),
|
||||
Inline = true
|
||||
},
|
||||
new EmbedField() {
|
||||
Name = "Commands Ran",
|
||||
Name = Format.Bold("Commands Ran"),
|
||||
Value = stats.CommandsRan.ToString(),
|
||||
Inline = true
|
||||
},
|
||||
new EmbedField() {
|
||||
Name = "Messages",
|
||||
Value = $"{stats.MessageCounter} [{stats.MessagesPerSecond:F2}/sec]",
|
||||
Name = Format.Bold("Messages"),
|
||||
Value = $"{stats.MessageCounter} ({stats.MessagesPerSecond:F2}/sec)",
|
||||
Inline = true
|
||||
},
|
||||
new EmbedField() {
|
||||
Name = "Memory",
|
||||
Name = Format.Bold("Memory"),
|
||||
Value = $"{stats.Heap} MB",
|
||||
Inline = true
|
||||
},
|
||||
new EmbedField() {
|
||||
Name = "Owner ID(s)",
|
||||
Name = Format.Bold("Owner ID(s)"),
|
||||
Value = stats.OwnerIds,
|
||||
Inline = true
|
||||
},
|
||||
new EmbedField() {
|
||||
Name = "Uptime",
|
||||
Name = Format.Bold("Uptime"),
|
||||
Value = stats.GetUptimeString("\n"),
|
||||
Inline = true
|
||||
},
|
||||
new EmbedField() {
|
||||
Name = "Presence",
|
||||
Value = $"{NadekoBot.Client.GetGuilds().Count} servers\n{stats.TextChannels} Text Channels\n{stats.VoiceChannels} Voice Channels",
|
||||
Name = Format.Bold("Presence"),
|
||||
Value = $"{NadekoBot.Client.GetGuilds().Count} Servers\n{stats.TextChannels} Text Channels\n{stats.VoiceChannels} Voice Channels",
|
||||
Inline = true
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user