Skip to content

Commit 75bc6fe

Browse files
NeloBlivionBobDotCompre-commit-ci[bot]Lulalaby
authored
Adjust original_message deprecation warning (#1681)
Co-authored-by: BobDotCom <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <[email protected]>
1 parent 80941fe commit 75bc6fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

discord/interactions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ async def original_response(self) -> InteractionMessage:
325325
self._original_response = message
326326
return message
327327

328-
@utils.deprecated("Interaction.original_response", "2.1")
328+
@utils.deprecated("Interaction.original_response", "2.2")
329329
async def original_message(self):
330330
"""An alias for :meth:`original_response`.
331331
@@ -341,7 +341,7 @@ async def original_message(self):
341341
ClientException
342342
The channel for the message could not be resolved.
343343
"""
344-
return self.original_response()
344+
return await self.original_response()
345345

346346
async def edit_original_response(
347347
self,
@@ -447,7 +447,7 @@ async def edit_original_response(
447447

448448
return message
449449

450-
@utils.deprecated("Interaction.edit_original_response", "2.1")
450+
@utils.deprecated("Interaction.edit_original_response", "2.2")
451451
async def edit_original_message(self, **kwargs):
452452
"""An alias for :meth:`edit_original_response`.
453453
@@ -467,7 +467,7 @@ async def edit_original_message(self, **kwargs):
467467
ValueError
468468
The length of ``embeds`` was invalid.
469469
"""
470-
return self.edit_original_response(**kwargs)
470+
return await self.edit_original_response(**kwargs)
471471

472472
async def delete_original_response(self, *, delay: float | None = None) -> None:
473473
"""|coro|
@@ -505,7 +505,7 @@ async def delete_original_response(self, *, delay: float | None = None) -> None:
505505
else:
506506
await func
507507

508-
@utils.deprecated("Interaction.delete_original_response", "2.1")
508+
@utils.deprecated("Interaction.delete_original_response", "2.2")
509509
async def delete_original_message(self, **kwargs):
510510
"""An alias for :meth:`delete_original_response`.
511511
@@ -516,7 +516,7 @@ async def delete_original_message(self, **kwargs):
516516
Forbidden
517517
Deleted a message that is not yours.
518518
"""
519-
return self.delete_original_response(**kwargs)
519+
return await self.delete_original_response(**kwargs)
520520

521521
def to_dict(self) -> dict[str, Any]:
522522
"""

0 commit comments

Comments
 (0)