Skip to content

Commit

Permalink
Fix edge case where perm names are not validated in custom Red decos (C…
Browse files Browse the repository at this point in the history
  • Loading branch information
Flame442 authored and Dav-Git committed Sep 8, 2024
1 parent 758dc74 commit 41f0712
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions redbot/core/commands/requires.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ def decorator(func: "_CommandOrCoro") -> "_CommandOrCoro":
if user_perms is None:
func.__requires_user_perms__ = None
else:
_validate_perms_dict(user_perms)
if getattr(func, "__requires_user_perms__", None) is None:
func.__requires_user_perms__ = discord.Permissions.none()
func.__requires_user_perms__.update(**user_perms)
Expand Down

0 comments on commit 41f0712

Please sign in to comment.