cocoa-discord - v3.2.0
    Preparing search index...

    Function SlashFull

    • Example Usage

      @SlashCommand(new SlashCommandBuilder().setName("ping").setDescription("pong!"))
      async ping(ctx: CommandInteraction) {
      await ctx.reply("pong!");
      }

      Note: If syntax highlight looks broken, blame your IDE. You may look at harunon.js to see this in action

      Parameters

      • command:
            | RESTPostAPIApplicationCommandsJSONBody
            | SlashCommandBuilder
            | Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">
      • Optionalguild_ids: string[]

      Returns (
          cog: SlashModuleClass,
          key: string,
          desc:
              | undefined
              | TypedPropertyDescriptor<
                  (interaction: ChatInputCommandInteraction) => Promise<void>,
              >,
      ) => void

    Index

    Methods

    • Automatically add Ephemeral Options to your command

      Your method should accept 2 arguments (ctx, ephemeral)

      Parameters

      • command:
            | SlashCommandBuilder
            | Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">
      • Optionalguild_ids: string[]

      Returns (
          mod: SlashModuleClass,
          key: string,
          desc: TypedPropertyDescriptor<
              (ctx: ChatInputCommandInteraction, ephemeral: boolean) => Promise<void>,
          >,
      ) => void

    • Parameters

      • resolver: () => Promise<
            | SlashCommandBuilder
            | Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">,
        >
      • Optionalguild_ids: string[]

      Returns (
          mod: SlashModuleClass,
          key: string,
          desc: TypedPropertyDescriptor<
              (interaction: ChatInputCommandInteraction) => Promise<void>,
          >,
      ) => void