Browse Source

Fix Module Preconditions (#343)

* fix module preconditions

* fix module preconditions
pull/1958/head
Cenk Ergen GitHub 3 years ago
parent
commit
e7b00ac1f8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net.Interactions/Info/ModuleInfo.cs

+ 2
- 2
src/Discord.Net.Interactions/Info/ModuleInfo.cs View File

@@ -118,7 +118,7 @@ namespace Discord.Interactions
IsTopLevelGroup = CheckTopLevel(parent);
DontAutoRegister = builder.DontAutoRegister;

GroupedPreconditions = builder.Preconditions.ToLookup(x => x.Group, x => x, StringComparer.Ordinal);
GroupedPreconditions = Preconditions.ToLookup(x => x.Group, x => x, StringComparer.Ordinal);
}

private IEnumerable<ModuleInfo> BuildSubModules (ModuleBuilder builder, InteractionService commandService, IServiceProvider services)
@@ -189,7 +189,7 @@ namespace Discord.Interactions
{
var preconditions = new List<PreconditionAttribute>();

var parent = builder.Parent;
var parent = builder;

while (parent != null)
{


Loading…
Cancel
Save