Refactor ContextMenuAPI (#2236)

This commit is contained in:
Kyuuhachi 2024-03-07 11:06:24 +01:00 committed by GitHub
parent 612fdf8952
commit 42a9fa2d47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 220 additions and 245 deletions

View file

@ -418,6 +418,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
Av32000: {
name: "Av32000",
id: 593436735380127770n,
},
Kyuuhachi: {
name: "Kyuuhachi",
id: 236588665420251137n,
}
} satisfies Record<string, Dev>);

View file

@ -17,6 +17,7 @@
*/
import { Command } from "@api/Commands";
import { NavContextMenuPatchCallback } from "@api/ContextMenu";
import { FluxEvents } from "@webpack/types";
import { Promisable } from "type-fest";
@ -115,6 +116,10 @@ export interface PluginDef {
flux?: {
[E in FluxEvents]?: (event: any) => void;
};
/**
* Allows you to manipulate context menus
*/
contextMenus?: Record<string, NavContextMenuPatchCallback>;
/**
* Allows you to add custom actions to the Vencord Toolbox.
* The key will be used as text for the button