Skip to content

Commit a250384

Browse files
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>
1 parent 3822109 commit a250384

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

interactions/client/context.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ async def send(
191191
:param Optional[Union[ActionRow, Button, SelectMenu, List[Union[ActionRow, Button, SelectMenu]]]] components: A component, or list of components for the message.
192192
:param Optional[bool] ephemeral: Whether the response is hidden or not.
193193
: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.
196195
"""
197196
if (
198197
content is MISSING
@@ -299,8 +298,7 @@ async def edit(
299298
:param Optional[Union[AllowedMentions, dict]] allowed_mentions: The allowed mentions for the message.
300299
:param Optional[MessageReference] message_reference: Include to make your message a reply.
301300
: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.
304302
"""
305303

306304
payload = {}
@@ -703,8 +701,8 @@ class ComponentContext(_Context):
703701
:ivar User user: The user data model.
704702
:ivar bool responded: Whether an original response was made or not.
705703
: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.
708706
:ivar str app_permissions: Bitwise set of permissions the bot has within the channel the interaction was sent from.
709707
"""
710708

0 commit comments

Comments
 (0)