fix: Private methods aren't added as commands (#1773)
Fix breaking change introduced by #1521
This commit is contained in:
committed by
GitHub
parent
73e5cc2fbc
commit
0fc713a897
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user