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

Fix breaking change introduced by #1521
This commit is contained in:
Antonio Zdravkov Nikolov
2021-02-10 02:04:32 +02:00
committed by GitHub
parent 73e5cc2fbc
commit 0fc713a897

View File

@@ -136,7 +136,7 @@ namespace Discord.Commands
builder.Name = typeInfo.Name; builder.Name = typeInfo.Name;
// Get all methods (including from inherited members), that are valid commands // 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) foreach (var method in validCommands)
{ {