5353
5454 from typing import Callable , Awaitable
5555
56- from ..utils import cached_property
5756from ..utils .private import copy_doc
5857
5958T = TypeVar ("T" )
@@ -137,68 +136,68 @@ async def invoke(
137136 """
138137 return await command (self , * args , ** kwargs )
139138
140- @cached_property
139+ @property
141140 def channel (self ) -> InteractionChannel | None :
142141 """Union[:class:`abc.GuildChannel`, :class:`PartialMessageable`, :class:`Thread`]:
143142 Returns the channel associated with this context's command. Shorthand for :attr:`.Interaction.channel`.
144143 """
145144 return self .interaction .channel
146145
147- @cached_property
146+ @property
148147 def channel_id (self ) -> int | None :
149148 """Returns the ID of the channel associated with this context's command.
150149 Shorthand for :attr:`.Interaction.channel_id`.
151150 """
152151 return self .interaction .channel_id
153152
154- @cached_property
153+ @property
155154 def guild (self ) -> Guild | None :
156155 """Returns the guild associated with this context's command.
157156 Shorthand for :attr:`.Interaction.guild`.
158157 """
159158 return self .interaction .guild
160159
161- @cached_property
160+ @property
162161 def guild_id (self ) -> int | None :
163162 """Returns the ID of the guild associated with this context's command.
164163 Shorthand for :attr:`.Interaction.guild_id`.
165164 """
166165 return self .interaction .guild_id
167166
168- @cached_property
167+ @property
169168 def locale (self ) -> str | None :
170169 """Returns the locale of the guild associated with this context's command.
171170 Shorthand for :attr:`.Interaction.locale`.
172171 """
173172 return self .interaction .locale
174173
175- @cached_property
174+ @property
176175 def guild_locale (self ) -> str | None :
177176 """Returns the locale of the guild associated with this context's command.
178177 Shorthand for :attr:`.Interaction.guild_locale`.
179178 """
180179 return self .interaction .guild_locale
181180
182- @cached_property
181+ @property
183182 def app_permissions (self ) -> Permissions :
184183 return self .interaction .app_permissions
185184
186- @cached_property
185+ @property
187186 def me (self ) -> Member | ClientUser | None :
188187 """Union[:class:`.Member`, :class:`.ClientUser`]:
189188 Similar to :attr:`.Guild.me` except it may return the :class:`.ClientUser` in private message
190189 message contexts, or when :meth:`Intents.guilds` is absent.
191190 """
192191 return self .interaction .guild .me if self .interaction .guild is not None else self .bot .user
193192
194- @cached_property
193+ @property
195194 def message (self ) -> Message | None :
196195 """Returns the message sent with this context's command.
197196 Shorthand for :attr:`.Interaction.message`, if applicable.
198197 """
199198 return self .interaction .message
200199
201- @cached_property
200+ @property
202201 def user (self ) -> Member | User :
203202 """Returns the user that sent this context's command.
204203 Shorthand for :attr:`.Interaction.user`.
@@ -217,7 +216,7 @@ def voice_client(self) -> VoiceClient | None:
217216
218217 return self .interaction .guild .voice_client
219218
220- @cached_property
219+ @property
221220 def response (self ) -> InteractionResponse :
222221 """Returns the response object associated with this context's command.
223222 Shorthand for :attr:`.Interaction.response`.
0 commit comments