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:
201
201
return self .interaction .message
202
202
203
203
@cached_property
204
- def user (self ) -> Member | User | None :
204
+ def user (self ) -> Member | User :
205
205
"""Returns the user that sent this context's command.
206
206
Shorthand for :attr:`.Interaction.user`.
207
207
"""
208
- return self .interaction .user
208
+ return self .interaction .user # type: ignore # command user will never be None
209
209
210
- author : Member | User | None = user
210
+ author = user
211
211
212
212
@property
213
213
def voice_client (self ) -> VoiceProtocol | None :
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ class Interaction:
104
104
application_id: :class:`int`
105
105
The application ID that the interaction was for.
106
106
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.
108
108
message: Optional[:class:`Message`]
109
109
The message that sent this interaction.
110
110
token: :class:`str`
You can’t perform that action at this time.
0 commit comments