mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
add: You can now check commands for submodules, for example '.h quote' the same way you can do for command groups like '.h bank'
This commit is contained in:
@@ -343,8 +343,12 @@ public sealed partial class Help : NadekoModule<HelpService>
|
|||||||
|
|
||||||
var group = _cmds.Modules
|
var group = _cmds.Modules
|
||||||
.SelectMany(x => x.Submodules)
|
.SelectMany(x => x.Submodules)
|
||||||
.Where(x => !string.IsNullOrWhiteSpace(x.Group))
|
.FirstOrDefault(x => string.Equals(x.Name?.Replace("Commands", string.Empty),
|
||||||
.FirstOrDefault(x => x.Group.Equals(fail, StringComparison.InvariantCultureIgnoreCase));
|
fail,
|
||||||
|
StringComparison.InvariantCultureIgnoreCase)
|
||||||
|
|| string.Equals(x.Group,
|
||||||
|
fail,
|
||||||
|
StringComparison.InvariantCultureIgnoreCase));
|
||||||
|
|
||||||
if (group is not null)
|
if (group is not null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user