File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -201,13 +201,13 @@ def message(self) -> Message | None:
201201 return self .interaction .message
202202
203203 @cached_property
204- def user (self ) -> Member | User | None :
204+ def user (self ) -> Member | User :
205205 """Returns the user that sent this context's command.
206206 Shorthand for :attr:`.Interaction.user`.
207207 """
208- return self .interaction .user
208+ return self .interaction .user # type: ignore # command user will never be None
209209
210- author : Member | User | None = user
210+ author = user
211211
212212 @property
213213 def voice_client (self ) -> VoiceProtocol | None :
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ class Interaction:
104104 application_id: :class:`int`
105105 The application ID that the interaction was for.
106106 user: Optional[Union[:class:`User`, :class:`Member`]]
107- The user or member that sent the interaction.
107+ The user or member that sent the interaction. Will be `None` in PING interactions.
108108 message: Optional[:class:`Message`]
109109 The message that sent this interaction.
110110 token: :class:`str`
You can’t perform that action at this time.
0 commit comments