Browse Source

added ModuleInfo.ModuleType

pull/1360/head
Dirk Kok GitHub 6 years ago
parent
commit
abc8038c55
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/Discord.Net.Commands/Info/ModuleInfo.cs

+ 5
- 0
src/Discord.Net.Commands/Info/ModuleInfo.cs View File

@@ -57,6 +57,10 @@ namespace Discord.Commands
/// </summary> /// </summary>
public ModuleInfo Parent { get; } public ModuleInfo Parent { get; }
/// <summary> /// <summary>
/// The Type of the module represented by this instance.
/// </summary>
public Type ModuleType { get; }
/// <summary>
/// Gets a value that indicates whether this module is a submodule or not. /// Gets a value that indicates whether this module is a submodule or not.
/// </summary> /// </summary>
public bool IsSubmodule => Parent != null; public bool IsSubmodule => Parent != null;
@@ -70,6 +74,7 @@ namespace Discord.Commands
Remarks = builder.Remarks; Remarks = builder.Remarks;
Group = builder.Group; Group = builder.Group;
Parent = parent; Parent = parent;
ModuleType = builder.TypeInfo.AsType();


Aliases = BuildAliases(builder, service).ToImmutableArray(); Aliases = BuildAliases(builder, service).ToImmutableArray();
Commands = builder.Commands.Select(x => x.Build(this, service)).ToImmutableArray(); Commands = builder.Commands.Select(x => x.Build(this, service)).ToImmutableArray();


Loading…
Cancel
Save