mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-16 22:55:03 +00:00
13 lines
549 B
TypeScript
13 lines
549 B
TypeScript
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);
|
|
}
|