closes #431, if gmod or gcmd is active on some module or command, they won't show up on -mdls or -cmds respectively
This commit is contained in:
		| @@ -31,6 +31,7 @@ namespace NadekoBot.Modules.Help | |||||||
|                 .WithTitle(GetText("list_of_modules")) |                 .WithTitle(GetText("list_of_modules")) | ||||||
|                 .WithDescription(string.Join("\n", |                 .WithDescription(string.Join("\n", | ||||||
|                                      NadekoBot.CommandService.Modules.GroupBy(m => m.GetTopLevelModule()) |                                      NadekoBot.CommandService.Modules.GroupBy(m => m.GetTopLevelModule()) | ||||||
|  |                                          .Where(m => !Permissions.Permissions.GlobalPermissionCommands.BlockedModules.Contains(m.Key.Name.ToLowerInvariant())) | ||||||
|                                          .Select(m => "• " + m.Key.Name) |                                          .Select(m => "• " + m.Key.Name) | ||||||
|                                          .OrderBy(s => s))); |                                          .OrderBy(s => s))); | ||||||
|             await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); |             await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); | ||||||
| @@ -45,6 +46,7 @@ namespace NadekoBot.Modules.Help | |||||||
|             if (string.IsNullOrWhiteSpace(module)) |             if (string.IsNullOrWhiteSpace(module)) | ||||||
|                 return; |                 return; | ||||||
|             var cmds = NadekoBot.CommandService.Commands.Where(c => c.Module.GetTopLevelModule().Name.ToUpperInvariant().StartsWith(module)) |             var cmds = NadekoBot.CommandService.Commands.Where(c => c.Module.GetTopLevelModule().Name.ToUpperInvariant().StartsWith(module)) | ||||||
|  |                                                   .Where(c => !Permissions.Permissions.GlobalPermissionCommands.BlockedCommands.Contains(c.Aliases.First().ToLowerInvariant())) | ||||||
|                                                   .OrderBy(c => c.Aliases.First()) |                                                   .OrderBy(c => c.Aliases.First()) | ||||||
|                                                   .Distinct(new CommandTextEqualityComparer()) |                                                   .Distinct(new CommandTextEqualityComparer()) | ||||||
|                                                   .AsEnumerable(); |                                                   .AsEnumerable(); | ||||||
|   | |||||||
| @@ -585,7 +585,7 @@ namespace NadekoBot.Modules.Searches | |||||||
|         { |         { | ||||||
|             if (usr == null) |             if (usr == null) | ||||||
|                 usr = Context.User; |                 usr = Context.User; | ||||||
|             await Context.Channel.SendConfirmAsync($"https://images.google.com/searchbyimage?image_url={usr.AvatarUrl}").ConfigureAwait(false); |             await Context.Channel.SendConfirmAsync($"https://images.google.com/searchbyimage?image_url={usr.RealAvatarUrl()}").ConfigureAwait(false); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         [NadekoCommand, Usage, Description, Aliases] |         [NadekoCommand, Usage, Description, Aliases] | ||||||
|   | |||||||
| @@ -5037,7 +5037,7 @@ namespace NadekoBot.Resources { | |||||||
|         } |         } | ||||||
|          |          | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         ///    Looks up a localized string similar to Mentions every person from the provided role or roles (separated by a ',') on this server. Requires you to have the mention everyone permission.. |         ///    Looks up a localized string similar to Mentions every person from the provided role or roles (separated by a ',') on this server.. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         public static string mentionrole_desc { |         public static string mentionrole_desc { | ||||||
|             get { |             get { | ||||||
|   | |||||||
| @@ -733,7 +733,7 @@ | |||||||
|     <value>mentionrole menro</value> |     <value>mentionrole menro</value> | ||||||
|   </data> |   </data> | ||||||
|   <data name="mentionrole_desc" xml:space="preserve"> |   <data name="mentionrole_desc" xml:space="preserve"> | ||||||
|     <value>Mentions every person from the provided role or roles (separated by a ',') on this server. Requires you to have the mention everyone permission.</value> |     <value>Mentions every person from the provided role or roles (separated by a ',') on this server.</value> | ||||||
|   </data> |   </data> | ||||||
|   <data name="mentionrole_usage" xml:space="preserve"> |   <data name="mentionrole_usage" xml:space="preserve"> | ||||||
|     <value>`{0}menro RoleName`</value> |     <value>`{0}menro RoleName`</value> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user