Skip to content

Commit

Permalink
docs: fix typos and improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
EQUENOS committed Sep 24, 2023
1 parent 8c6bb90 commit c44806b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions disnake/ext/commands/interaction_bot_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,8 @@ async def process_app_command_autocompletion(
inter: :class:`disnake.ApplicationCommandInteraction`
The interaction to process.
"""
# `inter.data.guild_id` is the guild ID the command is registered to,
# so this is correct even when a global command is called from a guild
cmd_index = AppCmdIndex(
type=inter.data.type, name=inter.data.name, guild_id=inter.data.guild_id
)
Expand Down Expand Up @@ -1587,6 +1589,8 @@ async def process_application_commands(

command_type = interaction.data.type
event_name = None
# `inter.data.guild_id` is the guild ID the command is registered to,
# so this is correct even when a global command is called from a guild
cmd_index = AppCmdIndex(
type=command_type, name=interaction.data.name, guild_id=interaction.data.guild_id
)
Expand Down
4 changes: 2 additions & 2 deletions disnake/interactions/application_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ class ApplicationCommandInteractionData(Dict[str, Any]):
guild_id: Optional[:class:`int`]
ID of the guild the command is registered to.
target_id: :class:`int`
ID of the user or message targetted by a user or message command.
ID of the user or message targeted by a user or message command.
target: Union[:class:`User`, :class:`Member`, :class:`Message`]
The user or message targetted by a user or message command.
The user or message targeted by a user or message command.
"""

__slots__ = (
Expand Down

0 comments on commit c44806b

Please sign in to comment.