diff --git a/ChaosBot/Discord/PreConditions/CheckCommandPerm.cs b/ChaosBot/Discord/PreConditions/CheckCommandPerm.cs index f7a3f32..2013651 100644 --- a/ChaosBot/Discord/PreConditions/CheckCommandPerm.cs +++ b/ChaosBot/Discord/PreConditions/CheckCommandPerm.cs @@ -45,6 +45,13 @@ namespace ChaosBot.Discord.PreConditions // If it's a role, check the configuration for the role otherwise return the permission value requiredGroup = ConfigurationRepository.GetValue($"Role:{perm.TargetId}", context.Guild.Id, perm.TargetId); } + else if (perm.TargetType == (int) PermissionTarget.User) + { + if(context.User.Id == perm.TargetId) + return Task.FromResult(PreconditionResult.FromSuccess()); + + return Task.FromResult(PreconditionResult.FromError($"You do not have access to this command.")); + } else { // Return the permission value