Skip to content

Commit

Permalink
fix: Properly replace exception
Browse files Browse the repository at this point in the history
Co-authored-by: shiftinv <[email protected]>
Signed-off-by: lena <[email protected]>
  • Loading branch information
elenakrittik and shiftinv authored Nov 4, 2023
1 parent 755f02d commit 9d8be27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion disnake/ext/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,8 @@ def app_check_any(*checks: AppCheck) -> Callable[[T], T]:
try:
return check_any(*checks) # type: ignore # impl is the same, typings are different
except TypeError as e:
raise TypeError(str(e).replace("commands.check", "commands.app_check")) # fix err message
msg = str(e).replace("commands.check", "commands.app_check") # fix err message
raise TypeError(msg) from None


def has_role(item: Union[int, str]) -> Callable[[T], T]:
Expand Down

0 comments on commit 9d8be27

Please sign in to comment.