Merge pull request #325 from Kwoth/dev

Better -h, better .whoplays
This commit is contained in:
Master Kwoth 2016-06-04 03:07:37 +02:00
commit 0dc819b449
3 changed files with 8 additions and 6 deletions

View File

@ -206,7 +206,7 @@ namespace NadekoBot
private async void StatsCollector_RanCommand(object sender, CommandEventArgs e) private async void StatsCollector_RanCommand(object sender, CommandEventArgs e)
{ {
Console.WriteLine($">>Command {e.Command.Text}"); Console.WriteLine($">> Cmd: {e.Command.Text}\nMsg: {e.Message.Text}\nUsr: {e.User.Name} [{e.User.Id}]\nSrvr: {e.Server?.Name ?? "PRIVATE"} [{e.Server?.Id}]\n-----");
await Task.Run(() => await Task.Run(() =>
{ {
try try

View File

@ -987,14 +987,15 @@ namespace NadekoBot.Modules.Administration
return; return;
var en = e.Server.Users var en = e.Server.Users
.Where(u => u.CurrentGame?.Name?.ToUpperInvariant() == game) .Where(u => u.CurrentGame?.Name?.ToUpperInvariant() == game)
.Select(u => $"{u.Name}"); .Select(u => u.Name);
var arr = en as string[] ?? en.ToArray(); var arr = en as string[] ?? en.ToArray();
int i = 0;
if (arr.Length == 0) if (arr.Length == 0)
await e.Channel.SendMessage("Nobody. (not 100% sure)"); await e.Channel.SendMessage("Nobody. (not 100% sure)");
else else
await e.Channel.SendMessage("" + string.Join("\n", arr)); await e.Channel.SendMessage("```xl\n" + string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Join("", ig.Select(el => $"• {el,-35}")))) + "\n```");
}); });
}); });

View File

@ -29,13 +29,14 @@ namespace NadekoBot.Classes.Help.Commands
}).ConfigureAwait(false); }).ConfigureAwait(false);
}; };
public static string HelpString => (NadekoBot.IsBot public static string HelpString => (NadekoBot.IsBot
? $"To add me to your server, use this link** -> <https://discordapp.com/oauth2/authorize?client_id=170254782546575360&scope=bot&permissions=66186303>\n" ? $"To add me to your server, use this link -> <https://discordapp.com/oauth2/authorize?client_id=170254782546575360&scope=bot&permissions=66186303>\n"
: $"To invite me to your server, just send me an invite link here.") + : $"To invite me to your server, just send me an invite link here.") +
$"You can use `{NadekoBot.Config.CommandPrefixes.Help}modules` command to see a list of all modules.\n" + $"You can use `{NadekoBot.Config.CommandPrefixes.Help}modules` command to see a list of all modules.\n" +
$"You can use `{NadekoBot.Config.CommandPrefixes.Help}commands ModuleName`" + $"You can use `{NadekoBot.Config.CommandPrefixes.Help}commands ModuleName`" +
$" (for example `{NadekoBot.Config.CommandPrefixes.Help}commands Administration`) to see a list of all of the commands in that module.\n" + $" (for example `{NadekoBot.Config.CommandPrefixes.Help}commands Administration`) to see a list of all of the commands in that module.\n" +
$"For a specific command help, use `{NadekoBot.Config.CommandPrefixes.Help}h \"Command name\"` (for example `-h \"!m q\"`)\n" + $"For a specific command help, use `{NadekoBot.Config.CommandPrefixes.Help}h \"Command name\"` (for example `-h \"!m q\"`)\n\n" +
"**LIST OF COMMANDS CAN BE FOUND ON THIS LINK**\n\n <https://github.com/Kwoth/NadekoBot/blob/master/commandlist.md>"; "**LIST OF COMMANDS CAN BE FOUND ON THIS LINK**\n\n <https://github.com/Kwoth/NadekoBot/blob/master/commandlist.md>\n\n" +
"Nadeko Support Server: <https://discord.gg/0ehQwTK2RBjAxzEY>";
public static string DMHelpString => NadekoBot.Config.DMHelpString; public static string DMHelpString => NadekoBot.Config.DMHelpString;