Fix the off-chance that someone has a property without a getter
This commit is contained in:
@@ -58,7 +58,7 @@ namespace Discord.Commands
|
||||
{
|
||||
foreach (var prop in ownerType.DeclaredProperties)
|
||||
{
|
||||
if (!prop.GetMethod.IsStatic && prop.SetMethod?.IsPublic == true && prop.GetCustomAttribute<DontInjectAttribute>() == null)
|
||||
if (prop.GetMethod?.IsStatic == false && prop.SetMethod?.IsPublic == true && prop.GetCustomAttribute<DontInjectAttribute>() == null)
|
||||
result.Add(prop);
|
||||
}
|
||||
ownerType = ownerType.BaseType.GetTypeInfo();
|
||||
|
||||
Reference in New Issue
Block a user