2929import datetime
3030from typing import TYPE_CHECKING , Any , Coroutine , Union
3131
32- from .utils .private import get_as_snowflake , deprecated , delay_task
32+ from .utils .private import get_as_snowflake , deprecated , delay_task , cached_slot_property
3333from . import utils
3434from .channel import ChannelType , PartialMessageable , _threaded_channel_factory
3535from .enums import (
@@ -297,7 +297,7 @@ def is_component(self) -> bool:
297297 """Indicates whether the interaction is a message component."""
298298 return self .type == InteractionType .component
299299
300- @utils . cached_slot_property ("_cs_channel" )
300+ @cached_slot_property ("_cs_channel" )
301301 @deprecated ("Interaction.channel" , "2.7" , stacklevel = 4 )
302302 def cached_channel (self ) -> InteractionChannel | None :
303303 """The cached channel from which the interaction was sent.
@@ -322,12 +322,12 @@ def permissions(self) -> Permissions:
322322 """
323323 return Permissions (self ._permissions )
324324
325- @utils . cached_slot_property ("_cs_app_permissions" )
325+ @cached_slot_property ("_cs_app_permissions" )
326326 def app_permissions (self ) -> Permissions :
327327 """The resolved permissions of the application in the channel, including overwrites."""
328328 return Permissions (self ._app_permissions )
329329
330- @utils . cached_slot_property ("_cs_response" )
330+ @cached_slot_property ("_cs_response" )
331331 def response (self ) -> InteractionResponse :
332332 """Returns an object responsible for handling responding to the interaction.
333333
@@ -336,7 +336,7 @@ def response(self) -> InteractionResponse:
336336 """
337337 return InteractionResponse (self )
338338
339- @utils . cached_slot_property ("_cs_followup" )
339+ @cached_slot_property ("_cs_followup" )
340340 def followup (self ) -> Webhook :
341341 """Returns the followup webhook for followup interactions."""
342342 payload = {
@@ -1542,7 +1542,7 @@ def __init__(self, *, data: InteractionMetadataPayload, state: ConnectionState):
15421542 def __repr__ (self ):
15431543 return f"<InteractionMetadata id={ self .id } type={ self .type !r} user={ self .user !r} >"
15441544
1545- @utils . cached_slot_property ("_cs_original_response_message" )
1545+ @cached_slot_property ("_cs_original_response_message" )
15461546 def original_response_message (self ) -> Message | None :
15471547 """Optional[:class:`Message`]: The original response message.
15481548 Returns ``None`` if the message is not in cache, or if :attr:`original_response_message_id` is ``None``.
@@ -1551,7 +1551,7 @@ def original_response_message(self) -> Message | None:
15511551 return None
15521552 return self ._state ._get_message (self .original_response_message_id )
15531553
1554- @utils . cached_slot_property ("_cs_interacted_message" )
1554+ @cached_slot_property ("_cs_interacted_message" )
15551555 def interacted_message (self ) -> Message | None :
15561556 """Optional[:class:`Message`]: The message that triggered the interaction.
15571557 Returns ``None`` if the message is not in cache, or if :attr:`interacted_message_id` is ``None``.
@@ -1597,7 +1597,7 @@ def __eq__(self, other):
15971597 def __ne__ (self , other ):
15981598 return not self .__eq__ (other )
15991599
1600- @utils . cached_slot_property ("_cs_user" )
1600+ @cached_slot_property ("_cs_user" )
16011601 def user (self ) -> User | None :
16021602 """Optional[:class:`User`]: The user that authorized the integration.
16031603 Returns ``None`` if the user is not in cache, or if :attr:`user_id` is ``None``.
@@ -1606,7 +1606,7 @@ def user(self) -> User | None:
16061606 return None
16071607 return self ._state .get_user (self .user_id )
16081608
1609- @utils . cached_slot_property ("_cs_guild" )
1609+ @cached_slot_property ("_cs_guild" )
16101610 def guild (self ) -> Guild | None :
16111611 """Optional[:class:`Guild`]: The guild that authorized the integration.
16121612 Returns ``None`` if the guild is not in cache, or if :attr:`guild_id` is ``0`` or ``None``.
0 commit comments