Fix attempting to inject into static properties
This commit is contained in:
@@ -58,7 +58,7 @@ namespace Discord.Commands
|
||||
{
|
||||
foreach (var prop in ownerType.DeclaredProperties)
|
||||
{
|
||||
if (prop.SetMethod?.IsPublic == true && prop.GetCustomAttribute<DontInjectAttribute>() == null)
|
||||
if (prop.GetMethod.IsStatic && prop.SetMethod?.IsPublic == true && prop.GetCustomAttribute<DontInjectAttribute>() == null)
|
||||
result.Add(prop);
|
||||
}
|
||||
ownerType = ownerType.BaseType.GetTypeInfo();
|
||||
|
||||
Reference in New Issue
Block a user