mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Context Menu Actions v1, clean and mute support with full options
This commit is contained in:
parent
2281dbcfef
commit
ff774aa5f6
19 changed files with 657 additions and 152 deletions
13
backend/src/plugins/ContextMenus/events/ContextClickedEvt.ts
Normal file
13
backend/src/plugins/ContextMenus/events/ContextClickedEvt.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { ContextMenuInteraction } from "discord.js";
|
||||
import { contextMenuEvt } from "../types";
|
||||
import { routeContextAction } from "../utils/contextRouter";
|
||||
|
||||
export const ContextClickedEvt = contextMenuEvt({
|
||||
event: "interactionCreate",
|
||||
|
||||
async listener(meta) {
|
||||
if (!meta.args.interaction.isContextMenu) return;
|
||||
const inter = meta.args.interaction as ContextMenuInteraction;
|
||||
await routeContextAction(meta.pluginData, inter);
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue