Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Commit

Permalink
Fix Module Preconditions (#343)
Browse files Browse the repository at this point in the history
* fix module preconditions

* fix module preconditions
  • Loading branch information
Cenngo authored Dec 4, 2021
1 parent 8eeeb17 commit e7b00ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Discord.Net.Interactions/Info/ModuleInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ internal ModuleInfo (ModuleBuilder builder, InteractionService commandService, I
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)
Expand Down Expand Up @@ -189,7 +189,7 @@ private static IEnumerable<PreconditionAttribute> BuildPreconditions (ModuleBuil
{
var preconditions = new List<PreconditionAttribute>();

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

while (parent != null)
{
Expand Down

0 comments on commit e7b00ac

Please sign in to comment.