Function slashCommand

  • Create a new slash command builder

    Parameters

    • name: string

      name of the command, 1-32 characters, (no symbols except - and _)

    • description: string

      1-100 character description

    Returns SlashCommandBuilder<{}>

    a builder

    Example

    script.createSlashCommand("echo", "echo's your input")
    .addOptionString("what", "what to echo")
    .build(async (ctx, args) => {
    await ctx.sendResponse(args.what);
    })

Generated using TypeDoc