diff --git a/ChaosBot/Discord/PreConditions/RequireRole.cs b/ChaosBot/Discord/PreConditions/RequireRole.cs index fd0b633..3416044 100644 --- a/ChaosBot/Discord/PreConditions/RequireRole.cs +++ b/ChaosBot/Discord/PreConditions/RequireRole.cs @@ -16,6 +16,11 @@ public class RequireRole : PreconditionAttribute { if (context.User is SocketGuildUser gUser) { + /* + * Owner has access to all commands + */ + if(context.Guild.OwnerId == context.User.Id) return Task.FromResult(PreconditionResult.FromSuccess()); + var requiredGroup = (ConfigurationRepository.GetValue($"Role:{_role}", context.Guild.Id) != null) ? ConfigurationRepository.GetValue($"Role:{_role}", context.Guild.Id) : _role; if (gUser.Roles.Any(r => r.Name == requiredGroup))