Skip to content

Commit

Permalink
fix: Private methods aren't added as commands (discord-net#1773)
Browse files Browse the repository at this point in the history
Fix breaking change introduced by discord-net#1521
  • Loading branch information
AntonioZn committed Feb 10, 2021
1 parent b75c376 commit 8c5a97b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private static void BuildModule(ModuleBuilder builder, TypeInfo typeInfo, Comman
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)
{
Expand Down

0 comments on commit 8c5a97b

Please sign in to comment.