mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Fix stacklevel for Message.interaction deprecation warning
This commit is contained in:
parent
34bf026a02
commit
aeab0d48fd
@ -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…
x
Reference in New Issue
Block a user