You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: remove return type from send&edit methods (#1188)
* docs: remove return type from send&edit methods
Add missed locale type in ComponentContext
* ci: correct from checks.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: interactions/client/context.py
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -191,8 +191,7 @@ async def send(
191
191
:param Optional[Union[ActionRow, Button, SelectMenu, List[Union[ActionRow, Button, SelectMenu]]]] components: A component, or list of components for the message.
192
192
:param Optional[bool] ephemeral: Whether the response is hidden or not.
193
193
:param Optional[bool] suppress_embeds: Whether embeds are not shown in the message.
194
-
:return: The sent message as a dict.
195
-
:rtype: Tuple[dict, Union[File, List[File]]]
194
+
:return: The sent message.
196
195
"""
197
196
if (
198
197
contentisMISSING
@@ -299,8 +298,7 @@ async def edit(
299
298
:param Optional[Union[AllowedMentions, dict]] allowed_mentions: The allowed mentions for the message.
300
299
:param Optional[MessageReference] message_reference: Include to make your message a reply.
301
300
:param Optional[Union[ActionRow, Button, SelectMenu, List[Union[ActionRow, Button, SelectMenu]]]] components: A component, or list of components for the message.
302
-
:return: The edited message as a dict.
303
-
:rtype: dict
301
+
:return: The edited message.
304
302
"""
305
303
306
304
payload= {}
@@ -703,8 +701,8 @@ class ComponentContext(_Context):
703
701
:ivar User user: The user data model.
704
702
:ivar bool responded: Whether an original response was made or not.
705
703
:ivar bool deferred: Whether the response was deferred or not.
706
-
:ivar str locale: The selected language of the user invoking the interaction.
707
-
:ivar str guild_locale: The guild's preferred language, if invoked in a guild.
704
+
:ivar Optional[Locale] locale: The selected language of the user invoking the interaction.
705
+
:ivar Optional[Locale] guild_locale: The guild's preferred language, if invoked in a guild.
708
706
:ivar str app_permissions: Bitwise set of permissions the bot has within the channel the interaction was sent from.
0 commit comments