Skip to content

Commit 4244cfb

Browse files
authored
docs: update Context menu guide (#1313)
1 parent 485ee87 commit 4244cfb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/src/Guides/04 Context Menus.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ For more information, please visit the API reference [here](/interactions.py/API
1111

1212
These open up if you right-click a message and choose `Apps`.
1313

14-
This example repeats the selected the message:
14+
This example repeats the selected message:
1515

1616
```python
17-
@context_menu(name="repeat", context_type=CommandType.MESSAGE)
18-
async def repeat(ctx: InteractionContext):
17+
@message_context_menu(name="repeat")
18+
async def repeat(ctx: ContextMenuContext):
1919
message: Message = ctx.target
2020
await ctx.send(message.content)
2121
```
@@ -27,10 +27,10 @@ These open up if you right-click a user and choose `Apps`.
2727
This example pings the user:
2828

2929
```python
30-
@context_menu(name="ping", context_type=CommandType.USER)
31-
async def ping(ctx: InteractionContext):
30+
@user_context_menu(name="ping")
31+
async def ping(ctx: ContextMenuContext):
3232
member: Member = ctx.target
3333
await ctx.send(member.mention)
3434
```
3535
??? note
36-
Command names must be lowercase and can only contain `-` and `_` as special symbols and must not contain spaces.
36+
Unlike Slash command names, context menu command names **can** be uppercase, contain special symbols and spaces.

0 commit comments

Comments
 (0)