From 479963bcc11fddde809a06888b5f64bdff5a5843 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sun, 1 Jan 2017 12:48:07 +0100 Subject: [PATCH] update to discord.net b2 finished possibly --- Discord.Net | 2 +- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs | 2 +- src/NadekoBot/Modules/Games/Commands/Acropobia.cs | 2 +- src/NadekoBot/Modules/Help/Help.cs | 4 ++-- src/NadekoBot/NadekoBot.cs | 3 +-- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Discord.Net b/Discord.Net index cfc82740..40fa35c8 160000 --- a/Discord.Net +++ b/Discord.Net @@ -1 +1 @@ -Subproject commit cfc827404af535b1e09d725284671b111fe85b93 +Subproject commit 40fa35c851076fb035fab06deb06f2b013281c15 diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 776071f8..a02daaeb 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -21,7 +21,7 @@ namespace NadekoBot.Modules.Administration public partial class Administration { [Group] - public class LogCommands + public class LogCommands : ModuleBase { private static ShardedDiscordClient _client { get; } private static Logger _log { get; } diff --git a/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs b/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs index 4790c890..0359d9ec 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/DiceRollCommand.cs @@ -17,7 +17,7 @@ namespace NadekoBot.Modules.Gambling public partial class Gambling { [Group] - public class DriceRollCommands + public class DriceRollCommands : ModuleBase { private Regex dndRegex { get; } = new Regex(@"^(?\d+)d(?\d+)(?:\+(?\d+))?(?:\-(?\d+))?$", RegexOptions.Compiled); private Regex fudgeRegex { get; } = new Regex(@"^(?\d+)d(?:F|f)$", RegexOptions.Compiled); diff --git a/src/NadekoBot/Modules/Games/Commands/Acropobia.cs b/src/NadekoBot/Modules/Games/Commands/Acropobia.cs index dc727a6c..4c8057d6 100644 --- a/src/NadekoBot/Modules/Games/Commands/Acropobia.cs +++ b/src/NadekoBot/Modules/Games/Commands/Acropobia.cs @@ -18,7 +18,7 @@ namespace NadekoBot.Modules.Games public partial class Games { [Group] - public class Acropobia + public class Acropobia : ModuleBase { //channelId, game public static ConcurrentDictionary AcrophobiaGames { get; } = new ConcurrentDictionary(); diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index 46b5fc78..3d32eaca 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -41,7 +41,7 @@ namespace NadekoBot.Modules.Help { var embed = new EmbedBuilder().WithOkColor().WithFooter(efb => efb.WithText($" ℹ️ Type `-cmds ModuleName` to get a list of commands in that module. eg `-cmds games`")) - .WithTitle("📜 List Of Modules").WithDescription("\n• " + string.Join("\n• ", NadekoBot.CommandService.Modules.Select(m => m.Name).OrderBy(s=>s))); + .WithTitle("📜 List Of Modules").WithDescription("\n• " + string.Join("\n• ", NadekoBot.CommandService.Modules.GroupBy(m => m.GetTopLevelModule()).Select(m => m.Key.Name).OrderBy(s => s))); await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); } @@ -53,7 +53,7 @@ namespace NadekoBot.Modules.Help module = module?.Trim().ToUpperInvariant(); if (string.IsNullOrWhiteSpace(module)) return; - var cmds = NadekoBot.CommandService.Commands.Where(c => c.Module.Name.ToUpperInvariant().StartsWith(module)) + var cmds = NadekoBot.CommandService.Commands.Where(c => c.Module.GetTopLevelModule().Name.ToUpperInvariant().StartsWith(module)) .OrderBy(c => c.Aliases.First()) .Distinct(new CommandTextEqualityComparer()) .AsEnumerable(); diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index a3a7a85b..8b7bba44 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -68,8 +68,7 @@ namespace NadekoBot //initialize Services CommandService = new CommandService(new CommandServiceConfig() { - CaseSensitiveCommands = false, - SeparatorChar = '-' + CaseSensitiveCommands = false }); Google = new GoogleApiService(); CommandHandler = new CommandHandler(Client, CommandService);