Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust original_message deprecation warning #1681

Merged
merged 13 commits into from
Oct 17, 2022
12 changes: 6 additions & 6 deletions discord/interactions.py
Expand Up @@ -325,7 +325,7 @@ async def original_response(self) -> InteractionMessage:
self._original_response = message
return message

@utils.deprecated("Interaction.original_response", "2.1")
@utils.deprecated("Interaction.original_response", "2.2")
async def original_message(self):
"""An alias for :meth:`original_response`.

Expand All @@ -341,7 +341,7 @@ async def original_message(self):
ClientException
The channel for the message could not be resolved.
"""
return self.original_response()
return await self.original_response()

async def edit_original_response(
self,
Expand Down Expand Up @@ -447,7 +447,7 @@ async def edit_original_response(

return message

@utils.deprecated("Interaction.edit_original_response", "2.1")
@utils.deprecated("Interaction.edit_original_response", "2.2")
async def edit_original_message(self, **kwargs):
"""An alias for :meth:`edit_original_response`.

Expand All @@ -467,7 +467,7 @@ async def edit_original_message(self, **kwargs):
ValueError
The length of ``embeds`` was invalid.
"""
return self.edit_original_response(**kwargs)
return await self.edit_original_response(**kwargs)

async def delete_original_response(self, *, delay: float | None = None) -> None:
"""|coro|
Expand Down Expand Up @@ -505,7 +505,7 @@ async def delete_original_response(self, *, delay: float | None = None) -> None:
else:
await func

@utils.deprecated("Interaction.delete_original_response", "2.1")
@utils.deprecated("Interaction.delete_original_response", "2.2")
async def delete_original_message(self, **kwargs):
"""An alias for :meth:`delete_original_response`.

Expand All @@ -516,7 +516,7 @@ async def delete_original_message(self, **kwargs):
Forbidden
Deleted a message that is not yours.
"""
return self.delete_original_response(**kwargs)
return await self.delete_original_response(**kwargs)

def to_dict(self) -> dict[str, Any]:
"""
Expand Down