File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ For more information, please visit the API reference [here](/interactions.py/API
1111
1212These 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`.
2727This 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.
You can’t perform that action at this time.
0 commit comments