3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-07 11:07:19 +00:00
This commit is contained in:
iamshoXy 2024-04-12 16:03:15 +02:00
parent 2e4d84571b
commit 450ce5e25e
21 changed files with 181 additions and 952 deletions

View file

@ -0,0 +1,13 @@
import { ContextMenuCommandInteraction } from "discord.js";
import { GuildPluginData } from "knub";
import { ContextMenuPluginType } from "../types";
import { hardcodedActions } from "./hardcodedContextOptions";
export async function routeContextAction(
pluginData: GuildPluginData<ContextMenuPluginType>,
interaction: ContextMenuCommandInteraction,
) {
const contextLink = await pluginData.state.contextMenuLinks.get(interaction.commandId);
if (!contextLink) return;
hardcodedActions[contextLink.action_name](pluginData, interaction);
}