Skip to content

Commit 63ceb51

Browse files
committed
better docstrings
1 parent 46340fd commit 63ceb51

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

discord/commands/context.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,26 @@ def response(self) -> InteractionResponse:
178178

179179
@property
180180
def selected_options(self) -> Optional[List[Dict]]:
181-
"""Returns a dictionary containing the options and values that were selected by the user when the command was processed, if applicable."""
181+
"""The options and values that were selected by the user when sending the command.
182+
183+
Returns
184+
-------
185+
Optional[List[Dict]]
186+
A dictionary containing the options and values that were selected by the user when the command was processed, if applicable.
187+
"""
182188
if "options" in self.interaction.data:
183189
return self.interaction.data["options"]
184190
return None
185191

186192
@property
187193
def unselected_options(self) -> Optional[List[Option]]:
188-
"""Returns a list of Option objects (if any) that were not selected by the user when the command was processed."""
194+
"""The options that were not provided by the user when sending the command.
195+
196+
Returns
197+
-------
198+
Optional[List[:class:`.Option`]]
199+
A list of Option objects (if any) that were not selected by the user when the command was processed.
200+
"""
189201
if self.command.options is not None: # type: ignore
190202
return [
191203
option

0 commit comments

Comments
 (0)