3232from discord .webhook .async_ import Webhook
3333
3434if TYPE_CHECKING :
35+ from typing import Awaitable , Callable
36+
3537 from typing_extensions import ParamSpec
3638
3739 import discord
38- from .. import Bot
39- from ..state import ConnectionState
40- from ..voice_client import VoiceClient
4140
42- from .core import ApplicationCommand , Option
43- from ..interactions import InteractionChannel
41+ from .. import Bot
42+ from ..client import ClientUser
43+ from ..cog import Cog
4444 from ..guild import Guild
45+ from ..interactions import InteractionChannel
4546 from ..member import Member
4647 from ..message import Message
47- from ..user import User
4848 from ..permissions import Permissions
49- from ..client import ClientUser
50-
51- from ..cog import Cog
49+ from ..state import ConnectionState
50+ from .. user import User
51+ from ..voice_client import VoiceClient
5252 from ..webhook import WebhookMessage
53-
54- from typing import Callable , Awaitable
55-
56- from ..utils import cached_property
53+ from .core import ApplicationCommand , Option
5754
5855T = TypeVar ("T" )
5956CogT = TypeVar ("CogT" , bound = "Cog" )
@@ -142,53 +139,53 @@ def command(self) -> ApplicationCommand | None:
142139 def command (self , value : ApplicationCommand | None ) -> None :
143140 self .interaction .command = value
144141
145- @cached_property
142+ @property
146143 def channel (self ) -> InteractionChannel | None :
147144 """Union[:class:`abc.GuildChannel`, :class:`PartialMessageable`, :class:`Thread`]:
148145 Returns the channel associated with this context's command. Shorthand for :attr:`.Interaction.channel`.
149146 """
150147 return self .interaction .channel
151148
152- @cached_property
149+ @property
153150 def channel_id (self ) -> int | None :
154151 """Returns the ID of the channel associated with this context's command.
155152 Shorthand for :attr:`.Interaction.channel_id`.
156153 """
157154 return self .interaction .channel_id
158155
159- @cached_property
156+ @property
160157 def guild (self ) -> Guild | None :
161158 """Returns the guild associated with this context's command.
162159 Shorthand for :attr:`.Interaction.guild`.
163160 """
164161 return self .interaction .guild
165162
166- @cached_property
163+ @property
167164 def guild_id (self ) -> int | None :
168165 """Returns the ID of the guild associated with this context's command.
169166 Shorthand for :attr:`.Interaction.guild_id`.
170167 """
171168 return self .interaction .guild_id
172169
173- @cached_property
170+ @property
174171 def locale (self ) -> str | None :
175172 """Returns the locale of the guild associated with this context's command.
176173 Shorthand for :attr:`.Interaction.locale`.
177174 """
178175 return self .interaction .locale
179176
180- @cached_property
177+ @property
181178 def guild_locale (self ) -> str | None :
182179 """Returns the locale of the guild associated with this context's command.
183180 Shorthand for :attr:`.Interaction.guild_locale`.
184181 """
185182 return self .interaction .guild_locale
186183
187- @cached_property
184+ @property
188185 def app_permissions (self ) -> Permissions :
189186 return self .interaction .app_permissions
190187
191- @cached_property
188+ @property
192189 def me (self ) -> Member | ClientUser | None :
193190 """Union[:class:`.Member`, :class:`.ClientUser`]:
194191 Similar to :attr:`.Guild.me` except it may return the :class:`.ClientUser` in private message
@@ -200,14 +197,14 @@ def me(self) -> Member | ClientUser | None:
200197 else self .bot .user
201198 )
202199
203- @cached_property
200+ @property
204201 def message (self ) -> Message | None :
205202 """Returns the message sent with this context's command.
206203 Shorthand for :attr:`.Interaction.message`, if applicable.
207204 """
208205 return self .interaction .message
209206
210- @cached_property
207+ @property
211208 def user (self ) -> Member | User :
212209 """Returns the user that sent this context's command.
213210 Shorthand for :attr:`.Interaction.user`.
@@ -226,7 +223,7 @@ def voice_client(self) -> VoiceClient | None:
226223
227224 return self .interaction .guild .voice_client
228225
229- @cached_property
226+ @property
230227 def response (self ) -> InteractionResponse :
231228 """Returns the response object associated with this context's command.
232229 Shorthand for :attr:`.Interaction.response`.
@@ -268,7 +265,7 @@ def unselected_options(self) -> list[Option] | None:
268265 return self .command .options # type: ignore
269266 return None
270267
271- @cached_property
268+ @property
272269 def attachment_size_limit (self ) -> int :
273270 """Returns the attachment size limit associated with this context's interaction.
274271 Shorthand for :attr:`.Interaction.attachment_size_limit`.
0 commit comments