commandModule
commandModule(
mod
):Module
Creates a command module with standardized structure and plugin support.
Parameters
• mod: InputCommand
Command module configuration
Returns
Processed command module ready for registration
Since
1.0.0
Example
1// Basic slash command2export default commandModule({3 type: CommandType.Slash,4 description: "Ping command",5 execute: async (ctx) => {6 await ctx.reply("Pong! 🏓");7 }8});
Example
1// Command with component interaction2export default commandModule({3 type: CommandType.Slash,4 description: "Interactive command",5 execute: async (ctx) => {6 const button = new ButtonBuilder({7 customId: "btn/someData",8 label: "Click me",9 style: ButtonStyle.Primary10 });11 await ctx.reply({12 content: "Interactive message",13 components: [new ActionRowBuilder().addComponents(button)]14 });15 }16});