From aeab0d48fd7e6483a977995450515e69e2b30cdb Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Wed, 28 Aug 2024 22:15:58 +0200 Subject: [PATCH] Fix stacklevel for Message.interaction deprecation warning --- discord/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/utils.py b/discord/utils.py index 99c7cfc94..89cc8bdeb 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -302,7 +302,7 @@ def deprecated(instead: Optional[str] = None) -> Callable[[Callable[P, T]], Call else: fmt = '{0.__name__} is deprecated.' - warnings.warn(fmt.format(func, instead), stacklevel=3, category=DeprecationWarning) + warnings.warn(fmt.format(func, instead), stacklevel=2, category=DeprecationWarning) warnings.simplefilter('default', DeprecationWarning) # reset filter return func(*args, **kwargs)