Browse Source

Fix stacklevel for Message.interaction deprecation warning

pull/9932/head
Jakub Kuczys 7 months ago
committed by GitHub
parent
commit
aeab0d48fd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      discord/utils.py

2
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)

Loading…
Cancel
Save