Skip to content

Commit

Permalink
Add version number to deprecation statement
Browse files Browse the repository at this point in the history
  • Loading branch information
breqdev committed Sep 10, 2021
1 parent 487b42c commit dd55be5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions flask_discord_interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@
from flask_discord_interactions.client import Client


# deprecated names
class Response(Message):
def __init__(self, *args, **kwargs):
warnings.warn(
"Deprecated! Response has been renamed to Message, "
"Deprecated! As of v1.1.0, Response has been renamed to Message, "
"as it can now represent the argument to a Message Command.",
DeprecationWarning,
stacklevel=2
Expand All @@ -57,7 +56,7 @@ def __init__(self, *args, **kwargs):
class SlashCommand(Command):
def __init__(self, *args, **kwargs):
warnings.warn(
"Deprecated! SlashCommand has been renamed to Command, "
"Deprecated! As of v1.1.0, SlashCommand has been renamed to Command, "
"as it can represent ChatInput (\"slash\") commands, "
"user commands, and message commands.",
DeprecationWarning,
Expand All @@ -69,7 +68,8 @@ def __init__(self, *args, **kwargs):
class InteractionContext(Context):
def __init__(self, *args, **kwargs):
warnings.warn(
"Deprecated! InteractionContext has been renamed to Context.",
"Deprecated! As of v0.1.5, "
"InteractionContext has been renamed to Context.",
DeprecationWarning,
stacklevel=2
)
Expand Down
10 changes: 5 additions & 5 deletions flask_discord_interactions/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def add_command(self, command, name=None, description=None,

def add_slash_command(self, *args, **kwargs):
"""
Deprecated! ``add_slash_command`` has been renamed to
Deprecated! As of v1.1.0, ``add_slash_command`` has been renamed to
:meth:`add_command`, as it can now add User and Message commands.
"""
warnings.warn(
"Deprecated! add_slash_command has been renamed to "
"Deprecated! As of v1.1.0, add_slash_command has been renamed to "
"add_command, as it can now add User and Message commands.",
DeprecationWarning,
stacklevel=2
Expand Down Expand Up @@ -359,12 +359,12 @@ def update_commands(self, app=None, guild_id=None):

def update_slash_commands(self, *args, **kwargs):
"""
Deprecated! ``update_slash_commands`` has been renamed to
Deprecated! As of v1.1.0, ``update_slash_commands`` has been renamed to
``update_commands``, as it updates User and Message commands as well.
"""
warnings.warn(
"Deprecated! update_slash_commands has been renamed to "
"update_commands, as it updates User and Message commands too.",
"Deprecated! As of v1.1.0, update_slash_commands has been renamed "
"to update_commands, as it updates User and Message commands too.",
DeprecationWarning,
stacklevel=2
)
Expand Down

0 comments on commit dd55be5

Please sign in to comment.