Browse Source

fix: Private methods aren't added as commands (#1773)

Fix breaking change introduced by #1521
tags/2.3.1
Antonio Zdravkov Nikolov GitHub 4 years ago
parent
commit
0fc713a897
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs

+ 1
- 1
src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs View File

@@ -136,7 +136,7 @@ namespace Discord.Commands
builder.Name = typeInfo.Name;

// Get all methods (including from inherited members), that are valid commands
var validCommands = typeInfo.GetMethods().Where(IsValidCommandDefinition);
var validCommands = typeInfo.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Where(IsValidCommandDefinition);

foreach (var method in validCommands)
{


Loading…
Cancel
Save