Skip to content

Commit

Permalink
Adjust original_message deprecation warning (#1681)
Browse files Browse the repository at this point in the history
Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Lala Sabathil <lala@pycord.dev>
  • Loading branch information
4 people committed Oct 17, 2022
1 parent 80941fe commit 75bc6fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions discord/interactions.py
Original file line number Diff line number Diff line change
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

0 comments on commit 75bc6fe

Please sign in to comment.