Menu API
Nekocord comes with an API for patching menus. These menus appear throughout Discord, such as through right-click context menus.

Menu patches are defined in the menu property of the plugin’s info object. The menu property is an object with keys corresponding to the menu type, and values being an array of menu patches.
Inserting items into menus
To insert an item into the menu, use the insert type. The position property specifies the index at which to insert the item, starting from the beginning of the menu, or starting from the end of menu if position is negative. The render property is a function that returns the element to insert.
Here’s an example of how to insert a menu item into the guild header popout menu:
// ...export class ExamplePlugin { info = { // ... menu: { ["guild-header-popout"]: [ { type: "insert", position: 0, render: () => { return ( <MenuGroup> <MenuItem id="test" label="test" action={() => {}} /> </MenuGroup> ); } } ] } } // ...}This would result in:
