|
28 | 28 | import asyncio |
29 | 29 | from typing import TYPE_CHECKING, Any, Coroutine, Union |
30 | 30 |
|
31 | | -from .utils.private import get_as_snowflake |
| 31 | +from .utils.private import get_as_snowflake, deprecated |
32 | 32 | from . import utils |
33 | 33 | from .channel import ChannelType, PartialMessageable, _threaded_channel_factory |
34 | 34 | from .enums import ( |
@@ -292,7 +292,7 @@ def is_component(self) -> bool: |
292 | 292 | return self.type == InteractionType.component |
293 | 293 |
|
294 | 294 | @utils.cached_slot_property("_cs_channel") |
295 | | - @discord.utils.private.deprecated("Interaction.channel", "2.7", stacklevel=4) |
| 295 | + @deprecated("Interaction.channel", "2.7", stacklevel=4) |
296 | 296 | def cached_channel(self) -> InteractionChannel | None: |
297 | 297 | """The cached channel from which the interaction was sent. |
298 | 298 | DM channels are not resolved. These are :class:`PartialMessageable` instead. |
@@ -428,7 +428,7 @@ async def original_response(self) -> InteractionMessage: |
428 | 428 | self._original_response = message |
429 | 429 | return message |
430 | 430 |
|
431 | | - @discord.utils.private.deprecated("Interaction.original_response", "2.2") |
| 431 | + @deprecated("Interaction.original_response", "2.2") |
432 | 432 | async def original_message(self): |
433 | 433 | """An alias for :meth:`original_response`. |
434 | 434 |
|
@@ -555,7 +555,7 @@ async def edit_original_response( |
555 | 555 |
|
556 | 556 | return message |
557 | 557 |
|
558 | | - @discord.utils.private.deprecated("Interaction.edit_original_response", "2.2") |
| 558 | + @deprecated("Interaction.edit_original_response", "2.2") |
559 | 559 | async def edit_original_message(self, **kwargs): |
560 | 560 | """An alias for :meth:`edit_original_response`. |
561 | 561 |
|
@@ -613,7 +613,7 @@ async def delete_original_response(self, *, delay: float | None = None) -> None: |
613 | 613 | else: |
614 | 614 | await func |
615 | 615 |
|
616 | | - @discord.utils.private.deprecated("Interaction.delete_original_response", "2.2") |
| 616 | + @deprecated("Interaction.delete_original_response", "2.2") |
617 | 617 | async def delete_original_message(self, **kwargs): |
618 | 618 | """An alias for :meth:`delete_original_response`. |
619 | 619 |
|
@@ -1238,7 +1238,7 @@ async def send_modal(self, modal: Modal) -> Interaction: |
1238 | 1238 | self._parent._state.store_modal(modal, self._parent.user.id) |
1239 | 1239 | return self._parent |
1240 | 1240 |
|
1241 | | - @discord.utils.private.deprecated("a button with type ButtonType.premium", "2.6") |
| 1241 | + @deprecated("a button with type ButtonType.premium", "2.6") |
1242 | 1242 | async def premium_required(self) -> Interaction: |
1243 | 1243 | """|coro| |
1244 | 1244 |
|
|
0 commit comments