> For the complete documentation index, see [llms.txt](https://docs.wildbeast.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wildbeast.guide/fundamentals/commands/context-menu-actions.md).

# Context menu actions

Add commands to context menus shown on right-click for users and messages

There are 2 types of context menu actions, depending on what the end user is opening the context menu on.

{% tabs %}
{% tab title="User context" %}
![](https://2866208395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgBu8pMq9JIzVAMYZqm%2Fuploads%2FNhGsYXcuMUr6yXy9b0M7%2Fafbeelding.png?alt=media\&token=17bc573b-43f8-4979-8ff9-a580b6afa60c)

```typescript
import { Interaction } from 'detritus-client'
import { MessageFlags } from 'detritus-client/lib/constants'

import { BaseContextMenuUserCommand, ContextMenuUserArgs } from '../../base'

export default class InformationCommand extends BaseContextMenuUserCommand {
  name = 'Avatar'

  async run (context: Interaction.InteractionContext, args: ContextMenuUserArgs): Promise<void> {
    await context.editOrRespond({
      embed: {
        description: `${args.user.mention}'s avatar`,
        image: {
          url: `${args.user.avatarUrl}?size=512`
        }
      },
      flags: MessageFlags.EPHEMERAL
    })
  }
}

```

{% endtab %}

{% tab title="Message context" %}
![](https://2866208395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgBu8pMq9JIzVAMYZqm%2Fuploads%2F8Yt5LXAhwEChviBUO3lV%2Fafbeelding.png?alt=media\&token=fd1db8fd-4373-4d6e-b0fd-a53d228b851f)

```typescript
import { Interaction } from 'detritus-client'
import { MessageFlags } from 'detritus-client/lib/constants'

import { BaseContextMenuMessageCommand, ContextMenuMessageArgs } from '../../base'

export default class InformationCommand extends BaseContextMenuMessageCommand {
  name = 'Message ID'

  async run (context: Interaction.InteractionContext, args: ContextMenuMessageArgs): Promise<void> {
    await context.editOrRespond({
      embed: {
        description: `Message ID: ${args.message.id}`
      },
      flags: MessageFlags.EPHEMERAL
    })
  }
}

```

{% endtab %}
{% endtabs %}
