MCQ minor consistency fix

This commit is contained in:
fkndean 2016-11-06 17:29:32 -05:00
parent 3611817e22
commit ac06c9b48b

View File

@ -524,18 +524,12 @@ $@"🌍 **Weather for** 【{obj["target"]}】
var res = await http.GetStringAsync($"https://api.minetools.eu/query/{Uri.EscapeUriString(ip)}/{Uri.EscapeUriString(port)}").ConfigureAwait(false); var res = await http.GetStringAsync($"https://api.minetools.eu/query/{Uri.EscapeUriString(ip)}/{Uri.EscapeUriString(port)}").ConfigureAwait(false);
var items = JObject.Parse(res); var items = JObject.Parse(res);
var sb = new StringBuilder(); var sb = new StringBuilder();
int i = 0;
sb.AppendLine($"`Server:` {arg.ToString()} 〘Status: {items["status"]}〙"); sb.AppendLine($"`Server:` {arg.ToString()} 〘Status: {items["status"]}〙");
sb.AppendLine($"`Player List:`"); sb.AppendLine($"`Player List (First 5):`");
for (int i = 0; i < items["Playerlist"].Count(); i++) foreach (var item in items["Playerlist"].Take(5))
{ {
if (i == 5) sb.AppendLine($":rosette: {item}");
{
break;
}
else
{
sb.AppendLine($"{i + 1}. {items["Playerlist"][i]}");
}
} }
sb.AppendLine($"`Online Players:` {items["Players"]} / {items["MaxPlayers"]}"); sb.AppendLine($"`Online Players:` {items["Players"]} / {items["MaxPlayers"]}");
sb.AppendLine($"`Plugins:` {items["Plugins"]}"); sb.AppendLine($"`Plugins:` {items["Plugins"]}");