From 57c7a9cd3e83366e41445c39997c76d8142a55a4 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 31 May 2016 23:13:44 +0200 Subject: [PATCH 1/5] Added support server to the help thing --- NadekoBot/Modules/Help/Commands/HelpCommand.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NadekoBot/Modules/Help/Commands/HelpCommand.cs b/NadekoBot/Modules/Help/Commands/HelpCommand.cs index 444cbeab..706dac39 100644 --- a/NadekoBot/Modules/Help/Commands/HelpCommand.cs +++ b/NadekoBot/Modules/Help/Commands/HelpCommand.cs @@ -29,13 +29,14 @@ namespace NadekoBot.Classes.Help.Commands }).ConfigureAwait(false); }; public static string HelpString => (NadekoBot.IsBot - ? $"To add me to your server, use this link** -> \n" + ? $"To add me to your server, use this link -> \n" : $"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}commands ModuleName`" + $" (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" + - "**LIST OF COMMANDS CAN BE FOUND ON THIS LINK**\n\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 \n\n" + + "Nadeko Support Server: "; public static string DMHelpString => NadekoBot.Config.DMHelpString; From e96189b9442a54140aeb1e944ed10d1dc050c78f Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Thu, 2 Jun 2016 21:31:06 +0200 Subject: [PATCH 2/5] better .whoplays format --- NadekoBot/Modules/Administration/AdministrationModule.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NadekoBot/Modules/Administration/AdministrationModule.cs b/NadekoBot/Modules/Administration/AdministrationModule.cs index f88c24b3..8a5f3a2b 100644 --- a/NadekoBot/Modules/Administration/AdministrationModule.cs +++ b/NadekoBot/Modules/Administration/AdministrationModule.cs @@ -987,14 +987,16 @@ namespace NadekoBot.Modules.Administration return; var en = e.Server.Users .Where(u => u.CurrentGame?.Name?.ToUpperInvariant() == game) - .Select(u => $"{u.Name}"); + .Select(u => u.Name); + var arr = en as string[] ?? en.ToArray(); + int i = 0; if (arr.Length == 0) await e.Channel.SendMessage("Nobody. (not 100% sure)"); else - await e.Channel.SendMessage("• " + string.Join("\n• ", arr)); + await e.Channel.SendMessage(string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Join(" ", ig.Select(el => $"{el,-35}"))))); }); }); From f9489ea8b24c12cc912d0ae59e592b0ba28f6218 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Thu, 2 Jun 2016 21:34:25 +0200 Subject: [PATCH 3/5] prettier .whopalys --- NadekoBot/Modules/Administration/AdministrationModule.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NadekoBot/Modules/Administration/AdministrationModule.cs b/NadekoBot/Modules/Administration/AdministrationModule.cs index 8a5f3a2b..fc612d18 100644 --- a/NadekoBot/Modules/Administration/AdministrationModule.cs +++ b/NadekoBot/Modules/Administration/AdministrationModule.cs @@ -989,14 +989,13 @@ namespace NadekoBot.Modules.Administration .Where(u => u.CurrentGame?.Name?.ToUpperInvariant() == game) .Select(u => u.Name); - var arr = en as string[] ?? en.ToArray(); int i = 0; if (arr.Length == 0) await e.Channel.SendMessage("Nobody. (not 100% sure)"); else - await e.Channel.SendMessage(string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Join(" ", ig.Select(el => $"{el,-35}"))))); + await e.Channel.SendMessage(string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Join("", ig.Select(el => $"• {el,-35}"))))); }); }); From 88368be749cc8f78fa41b9bcedabf13b2af46c2d Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 3 Jun 2016 02:20:01 +0200 Subject: [PATCH 4/5] more informative commandran --- NadekoBot/Classes/NadekoStats.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NadekoBot/Classes/NadekoStats.cs b/NadekoBot/Classes/NadekoStats.cs index f5f7766f..66ef0984 100644 --- a/NadekoBot/Classes/NadekoStats.cs +++ b/NadekoBot/Classes/NadekoStats.cs @@ -206,7 +206,7 @@ namespace NadekoBot 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(() => { try From 052fa32e551d6dec68c6468f7497563e9525529f Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sat, 4 Jun 2016 03:06:20 +0200 Subject: [PATCH 5/5] .whoplays final fancy fix --- NadekoBot/Modules/Administration/AdministrationModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NadekoBot/Modules/Administration/AdministrationModule.cs b/NadekoBot/Modules/Administration/AdministrationModule.cs index fc612d18..eb2ae46d 100644 --- a/NadekoBot/Modules/Administration/AdministrationModule.cs +++ b/NadekoBot/Modules/Administration/AdministrationModule.cs @@ -995,7 +995,7 @@ namespace NadekoBot.Modules.Administration if (arr.Length == 0) await e.Channel.SendMessage("Nobody. (not 100% sure)"); else - await e.Channel.SendMessage(string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Join("", ig.Select(el => $"• {el,-35}"))))); + await e.Channel.SendMessage("```xl\n" + string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Join("", ig.Select(el => $"• {el,-35}")))) + "\n```"); }); });