import { handle } from "https://deno.land/x/harmony@v2.9.0/deploy.ts";
Register Slash Command handler.
Example:
handle("ping", (interaction) => {
interaction.reply("Pong!")
})
Also supports Sub Command and Group handling out of the box!
handle("command-name group-name sub-command", (i) => {
// ...
})
handle("command-name sub-command", (i) => {
// ...
})
Parameters
Command to handle. Either Handler object or command name followed by handler function in next parameter.
handler: ApplicationCommandHandlerCallback
Handler function (required if previous argument was command name)
Parameters
handler: ApplicationCommandHandlerCallback
type: ApplicationCommandType | keyof ApplicationCommandType