3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-07 11:07:19 +00:00

Improve context menu commands

This commit is contained in:
iamshoXy 2023-09-09 15:56:15 +02:00
parent 0612b6f17d
commit fbc1054aab
25 changed files with 1150 additions and 242 deletions

View file

@ -1,13 +0,0 @@
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);
}