Skip to content

Commit 43e6a42

Browse files
Merge pull request #222 from Toricane/patch-1
Fix spelling mistakes in components.rst
2 parents 859beb6 + 50a58a3 commit 43e6a42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/components.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Let's register our callback function via decorator :meth:`component_callback() <
8686
async def hello(button_context: ComponentContext):
8787
await ctx.edit_origin(content="You pressed a button!")
8888
89-
In this example, :func:`hello` will be triggered when you receive interaction event from a component with a `custom_id` set to `"hello"`. Just like slash commands, The callback's `custom_id` defaults to the function name.
89+
In this example, :func:`hello` will be triggered when you receive interaction event from a component with a `custom_id` set to `"hello"`. Just like slash commands, the callback's `custom_id` defaults to the function name.
9090
You can also register such callbacks in cogs using :func:`cog_component() <discord_slash.cog_ext>`
9191
Additionally, component callbacks can be dynamically added, removed or edited - see :class:`SlashCommand <discord_slash.client.SlashCommand>`
9292

@@ -95,7 +95,7 @@ But [writer], I dont want to edit the message
9595

9696
Well lucky for you, you don't have to. You can either respond silently, with a thinking animation, or send a whole new message. Take a look here: :class:`ComponentContext <discord_slash.context.ComponentContext>`
9797

98-
How do i know which button was pressed?
98+
How do I know which button was pressed?
9999
_______________________________________
100100

101101
Each button gets a ``custom_id`` (which is always a string), this is a unique identifier of which button is being pressed. You can specify what the ID is when you define your button, if you don't; a random one will be generated. When handling the event, simply check the custom_id, and handle accordingly.

0 commit comments

Comments
 (0)