|
|
@@ -20,6 +20,9 @@ namespace Discord.Commands |
|
|
|
public ModuleInfo Parent { get; } |
|
|
|
public bool IsSubmodule => Parent != null; |
|
|
|
|
|
|
|
public TPrecondition GetPrecondition<TPrecondition>() where TPrecondition : PreconditionAttribute => |
|
|
|
Preconditions.FirstOrDefault(x => x is TPrecondition) as TPrecondition; |
|
|
|
|
|
|
|
internal ModuleInfo(ModuleBuilder builder, CommandService service, ModuleInfo parent = null) |
|
|
|
{ |
|
|
|
Service = service; |
|
|
|