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:
parent
0612b6f17d
commit
fbc1054aab
25 changed files with 1150 additions and 242 deletions
|
@ -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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue