Class DApplicationCommand

Hierarchy

  • Method
    • DApplicationCommand

Constructors

Properties

_classRef: Record<string, any>
_discord: DDiscord
_from: Record<string, any>
_guards: DGuard[] = []
_index?: number
_key: string
_method?: Record<string, any>

Accessors

  • get classRef(): Record<string, any>
  • Gets or sets the class reference being decorated.

    Returns Record<string, any>

  • set classRef(value: Record<string, any>): void
  • Parameters

    • value: Record<string, any>

    Returns void

  • get defaultMemberPermissions(): | null
    | string
    | bigint
    | RecursiveReadonlyArray<
        | bigint
        | `${bigint}`
        | "CreateInstantInvite"
        | "KickMembers"
        | "BanMembers"
        | "Administrator"
        | "ManageChannels"
        | "ManageGuild"
        | "AddReactions"
        | "ViewAuditLog"
        | "PrioritySpeaker"
        | "Stream"
        | "ViewChannel"
        | "SendMessages"
        | "SendTTSMessages"
        | "ManageMessages"
        | "EmbedLinks"
        | "AttachFiles"
        | "ReadMessageHistory"
        | "MentionEveryone"
        | "UseExternalEmojis"
        | "ViewGuildInsights"
        | "Connect"
        | "Speak"
        | "MuteMembers"
        | "DeafenMembers"
        | "MoveMembers"
        | "UseVAD"
        | "ChangeNickname"
        | "ManageNicknames"
        | "ManageRoles"
        | "ManageWebhooks"
        | "ManageEmojisAndStickers"
        | "ManageGuildExpressions"
        | "UseApplicationCommands"
        | "RequestToSpeak"
        | "ManageEvents"
        | "ManageThreads"
        | "CreatePublicThreads"
        | "CreatePrivateThreads"
        | "UseExternalStickers"
        | "SendMessagesInThreads"
        | "UseEmbeddedActivities"
        | "ModerateMembers"
        | "ViewCreatorMonetizationAnalytics"
        | "UseSoundboard"
        | "CreateGuildExpressions"
        | "CreateEvents"
        | "UseExternalSounds"
        | "SendVoiceMessages"
        | "SendPolls"
        | "UseExternalApps"
        | Readonly<
            BitField<
                | "CreateInstantInvite"
                | "KickMembers"
                | "BanMembers"
                | "Administrator"
                | "ManageChannels"
                | "ManageGuild"
                | "AddReactions"
                | "ViewAuditLog"
                | "PrioritySpeaker"
                | "Stream"
                | "ViewChannel"
                | "SendMessages"
                | "SendTTSMessages"
                | "ManageMessages"
                | "EmbedLinks"
                | "AttachFiles"
                | "ReadMessageHistory"
                | "MentionEveryone"
                | "UseExternalEmojis"
                | "ViewGuildInsights"
                | "Connect"
                | "Speak"
                | "MuteMembers"
                | "DeafenMembers"
                | "MoveMembers"
                | "UseVAD"
                | "ChangeNickname"
                | "ManageNicknames"
                | "ManageRoles"
                | "ManageWebhooks"
                | "ManageEmojisAndStickers"
                | "ManageGuildExpressions"
                | "UseApplicationCommands"
                | "RequestToSpeak"
                | "ManageEvents"
                | "ManageThreads"
                | "CreatePublicThreads"
                | "CreatePrivateThreads"
                | "UseExternalStickers"
                | "SendMessagesInThreads"
                | "UseEmbeddedActivities"
                | "ModerateMembers"
                | "ViewCreatorMonetizationAnalytics"
                | "UseSoundboard"
                | "CreateGuildExpressions"
                | "CreateEvents"
                | "UseExternalSounds"
                | "SendVoiceMessages"
                | "SendPolls"
                | "UseExternalApps",
                bigint,
            >,
        >,
    >
    | Readonly<
        BitField<
            | "CreateInstantInvite"
            | "KickMembers"
            | "BanMembers"
            | "Administrator"
            | "ManageChannels"
            | "ManageGuild"
            | "AddReactions"
            | "ViewAuditLog"
            | "PrioritySpeaker"
            | "Stream"
            | "ViewChannel"
            | "SendMessages"
            | "SendTTSMessages"
            | "ManageMessages"
            | "EmbedLinks"
            | "AttachFiles"
            | "ReadMessageHistory"
            | "MentionEveryone"
            | "UseExternalEmojis"
            | "ViewGuildInsights"
            | "Connect"
            | "Speak"
            | "MuteMembers"
            | "DeafenMembers"
            | "MoveMembers"
            | "UseVAD"
            | "ChangeNickname"
            | "ManageNicknames"
            | "ManageRoles"
            | "ManageWebhooks"
            | "ManageEmojisAndStickers"
            | "ManageGuildExpressions"
            | "UseApplicationCommands"
            | "RequestToSpeak"
            | "ManageEvents"
            | "ManageThreads"
            | "CreatePublicThreads"
            | "CreatePrivateThreads"
            | "UseExternalStickers"
            | "SendMessagesInThreads"
            | "UseEmbeddedActivities"
            | "ModerateMembers"
            | "ViewCreatorMonetizationAnalytics"
            | "UseSoundboard"
            | "CreateGuildExpressions"
            | "CreateEvents"
            | "UseExternalSounds"
            | "SendVoiceMessages"
            | "SendPolls"
            | "UseExternalApps",
            bigint,
        >,
    >
  • Returns
        | null
        | string
        | bigint
        | RecursiveReadonlyArray<
            | bigint
            | `${bigint}`
            | "CreateInstantInvite"
            | "KickMembers"
            | "BanMembers"
            | "Administrator"
            | "ManageChannels"
            | "ManageGuild"
            | "AddReactions"
            | "ViewAuditLog"
            | "PrioritySpeaker"
            | "Stream"
            | "ViewChannel"
            | "SendMessages"
            | "SendTTSMessages"
            | "ManageMessages"
            | "EmbedLinks"
            | "AttachFiles"
            | "ReadMessageHistory"
            | "MentionEveryone"
            | "UseExternalEmojis"
            | "ViewGuildInsights"
            | "Connect"
            | "Speak"
            | "MuteMembers"
            | "DeafenMembers"
            | "MoveMembers"
            | "UseVAD"
            | "ChangeNickname"
            | "ManageNicknames"
            | "ManageRoles"
            | "ManageWebhooks"
            | "ManageEmojisAndStickers"
            | "ManageGuildExpressions"
            | "UseApplicationCommands"
            | "RequestToSpeak"
            | "ManageEvents"
            | "ManageThreads"
            | "CreatePublicThreads"
            | "CreatePrivateThreads"
            | "UseExternalStickers"
            | "SendMessagesInThreads"
            | "UseEmbeddedActivities"
            | "ModerateMembers"
            | "ViewCreatorMonetizationAnalytics"
            | "UseSoundboard"
            | "CreateGuildExpressions"
            | "CreateEvents"
            | "UseExternalSounds"
            | "SendVoiceMessages"
            | "SendPolls"
            | "UseExternalApps"
            | Readonly<
                BitField<
                    | "CreateInstantInvite"
                    | "KickMembers"
                    | "BanMembers"
                    | "Administrator"
                    | "ManageChannels"
                    | "ManageGuild"
                    | "AddReactions"
                    | "ViewAuditLog"
                    | "PrioritySpeaker"
                    | "Stream"
                    | "ViewChannel"
                    | "SendMessages"
                    | "SendTTSMessages"
                    | "ManageMessages"
                    | "EmbedLinks"
                    | "AttachFiles"
                    | "ReadMessageHistory"
                    | "MentionEveryone"
                    | "UseExternalEmojis"
                    | "ViewGuildInsights"
                    | "Connect"
                    | "Speak"
                    | "MuteMembers"
                    | "DeafenMembers"
                    | "MoveMembers"
                    | "UseVAD"
                    | "ChangeNickname"
                    | "ManageNicknames"
                    | "ManageRoles"
                    | "ManageWebhooks"
                    | "ManageEmojisAndStickers"
                    | "ManageGuildExpressions"
                    | "UseApplicationCommands"
                    | "RequestToSpeak"
                    | "ManageEvents"
                    | "ManageThreads"
                    | "CreatePublicThreads"
                    | "CreatePrivateThreads"
                    | "UseExternalStickers"
                    | "SendMessagesInThreads"
                    | "UseEmbeddedActivities"
                    | "ModerateMembers"
                    | "ViewCreatorMonetizationAnalytics"
                    | "UseSoundboard"
                    | "CreateGuildExpressions"
                    | "CreateEvents"
                    | "UseExternalSounds"
                    | "SendVoiceMessages"
                    | "SendPolls"
                    | "UseExternalApps",
                    bigint,
                >,
            >,
        >
        | Readonly<
            BitField<
                | "CreateInstantInvite"
                | "KickMembers"
                | "BanMembers"
                | "Administrator"
                | "ManageChannels"
                | "ManageGuild"
                | "AddReactions"
                | "ViewAuditLog"
                | "PrioritySpeaker"
                | "Stream"
                | "ViewChannel"
                | "SendMessages"
                | "SendTTSMessages"
                | "ManageMessages"
                | "EmbedLinks"
                | "AttachFiles"
                | "ReadMessageHistory"
                | "MentionEveryone"
                | "UseExternalEmojis"
                | "ViewGuildInsights"
                | "Connect"
                | "Speak"
                | "MuteMembers"
                | "DeafenMembers"
                | "MoveMembers"
                | "UseVAD"
                | "ChangeNickname"
                | "ManageNicknames"
                | "ManageRoles"
                | "ManageWebhooks"
                | "ManageEmojisAndStickers"
                | "ManageGuildExpressions"
                | "UseApplicationCommands"
                | "RequestToSpeak"
                | "ManageEvents"
                | "ManageThreads"
                | "CreatePublicThreads"
                | "CreatePrivateThreads"
                | "UseExternalStickers"
                | "SendMessagesInThreads"
                | "UseEmbeddedActivities"
                | "ModerateMembers"
                | "ViewCreatorMonetizationAnalytics"
                | "UseSoundboard"
                | "CreateGuildExpressions"
                | "CreateEvents"
                | "UseExternalSounds"
                | "SendVoiceMessages"
                | "SendPolls"
                | "UseExternalApps",
                bigint,
            >,
        >

  • set defaultMemberPermissions(
        value:
            | null
            | string
            | bigint
            | RecursiveReadonlyArray<
                | bigint
                | `${bigint}`
                | "CreateInstantInvite"
                | "KickMembers"
                | "BanMembers"
                | "Administrator"
                | "ManageChannels"
                | "ManageGuild"
                | "AddReactions"
                | "ViewAuditLog"
                | "PrioritySpeaker"
                | "Stream"
                | "ViewChannel"
                | "SendMessages"
                | "SendTTSMessages"
                | "ManageMessages"
                | "EmbedLinks"
                | "AttachFiles"
                | "ReadMessageHistory"
                | "MentionEveryone"
                | "UseExternalEmojis"
                | "ViewGuildInsights"
                | "Connect"
                | "Speak"
                | "MuteMembers"
                | "DeafenMembers"
                | "MoveMembers"
                | "UseVAD"
                | "ChangeNickname"
                | "ManageNicknames"
                | "ManageRoles"
                | "ManageWebhooks"
                | "ManageEmojisAndStickers"
                | "ManageGuildExpressions"
                | "UseApplicationCommands"
                | "RequestToSpeak"
                | "ManageEvents"
                | "ManageThreads"
                | "CreatePublicThreads"
                | "CreatePrivateThreads"
                | "UseExternalStickers"
                | "SendMessagesInThreads"
                | "UseEmbeddedActivities"
                | "ModerateMembers"
                | "ViewCreatorMonetizationAnalytics"
                | "UseSoundboard"
                | "CreateGuildExpressions"
                | "CreateEvents"
                | "UseExternalSounds"
                | "SendVoiceMessages"
                | "SendPolls"
                | "UseExternalApps"
                | Readonly<
                    BitField<
                        | "CreateInstantInvite"
                        | "KickMembers"
                        | "BanMembers"
                        | "Administrator"
                        | "ManageChannels"
                        | "ManageGuild"
                        | "AddReactions"
                        | "ViewAuditLog"
                        | "PrioritySpeaker"
                        | "Stream"
                        | "ViewChannel"
                        | "SendMessages"
                        | "SendTTSMessages"
                        | "ManageMessages"
                        | "EmbedLinks"
                        | "AttachFiles"
                        | "ReadMessageHistory"
                        | "MentionEveryone"
                        | "UseExternalEmojis"
                        | "ViewGuildInsights"
                        | "Connect"
                        | "Speak"
                        | "MuteMembers"
                        | "DeafenMembers"
                        | "MoveMembers"
                        | "UseVAD"
                        | "ChangeNickname"
                        | "ManageNicknames"
                        | "ManageRoles"
                        | "ManageWebhooks"
                        | "ManageEmojisAndStickers"
                        | "ManageGuildExpressions"
                        | "UseApplicationCommands"
                        | "RequestToSpeak"
                        | "ManageEvents"
                        | "ManageThreads"
                        | "CreatePublicThreads"
                        | "CreatePrivateThreads"
                        | "UseExternalStickers"
                        | "SendMessagesInThreads"
                        | "UseEmbeddedActivities"
                        | "ModerateMembers"
                        | "ViewCreatorMonetizationAnalytics"
                        | "UseSoundboard"
                        | "CreateGuildExpressions"
                        | "CreateEvents"
                        | "UseExternalSounds"
                        | "SendVoiceMessages"
                        | "SendPolls"
                        | "UseExternalApps",
                        bigint,
                    >,
                >,
            >
            | Readonly<
                BitField<
                    | "CreateInstantInvite"
                    | "KickMembers"
                    | "BanMembers"
                    | "Administrator"
                    | "ManageChannels"
                    | "ManageGuild"
                    | "AddReactions"
                    | "ViewAuditLog"
                    | "PrioritySpeaker"
                    | "Stream"
                    | "ViewChannel"
                    | "SendMessages"
                    | "SendTTSMessages"
                    | "ManageMessages"
                    | "EmbedLinks"
                    | "AttachFiles"
                    | "ReadMessageHistory"
                    | "MentionEveryone"
                    | "UseExternalEmojis"
                    | "ViewGuildInsights"
                    | "Connect"
                    | "Speak"
                    | "MuteMembers"
                    | "DeafenMembers"
                    | "MoveMembers"
                    | "UseVAD"
                    | "ChangeNickname"
                    | "ManageNicknames"
                    | "ManageRoles"
                    | "ManageWebhooks"
                    | "ManageEmojisAndStickers"
                    | "ManageGuildExpressions"
                    | "UseApplicationCommands"
                    | "RequestToSpeak"
                    | "ManageEvents"
                    | "ManageThreads"
                    | "CreatePublicThreads"
                    | "CreatePrivateThreads"
                    | "UseExternalStickers"
                    | "SendMessagesInThreads"
                    | "UseEmbeddedActivities"
                    | "ModerateMembers"
                    | "ViewCreatorMonetizationAnalytics"
                    | "UseSoundboard"
                    | "CreateGuildExpressions"
                    | "CreateEvents"
                    | "UseExternalSounds"
                    | "SendVoiceMessages"
                    | "SendPolls"
                    | "UseExternalApps",
                    bigint,
                >,
            >,
    ): void
  • Parameters

    • value:
          | null
          | string
          | bigint
          | RecursiveReadonlyArray<
              | bigint
              | `${bigint}`
              | "CreateInstantInvite"
              | "KickMembers"
              | "BanMembers"
              | "Administrator"
              | "ManageChannels"
              | "ManageGuild"
              | "AddReactions"
              | "ViewAuditLog"
              | "PrioritySpeaker"
              | "Stream"
              | "ViewChannel"
              | "SendMessages"
              | "SendTTSMessages"
              | "ManageMessages"
              | "EmbedLinks"
              | "AttachFiles"
              | "ReadMessageHistory"
              | "MentionEveryone"
              | "UseExternalEmojis"
              | "ViewGuildInsights"
              | "Connect"
              | "Speak"
              | "MuteMembers"
              | "DeafenMembers"
              | "MoveMembers"
              | "UseVAD"
              | "ChangeNickname"
              | "ManageNicknames"
              | "ManageRoles"
              | "ManageWebhooks"
              | "ManageEmojisAndStickers"
              | "ManageGuildExpressions"
              | "UseApplicationCommands"
              | "RequestToSpeak"
              | "ManageEvents"
              | "ManageThreads"
              | "CreatePublicThreads"
              | "CreatePrivateThreads"
              | "UseExternalStickers"
              | "SendMessagesInThreads"
              | "UseEmbeddedActivities"
              | "ModerateMembers"
              | "ViewCreatorMonetizationAnalytics"
              | "UseSoundboard"
              | "CreateGuildExpressions"
              | "CreateEvents"
              | "UseExternalSounds"
              | "SendVoiceMessages"
              | "SendPolls"
              | "UseExternalApps"
              | Readonly<
                  BitField<
                      | "CreateInstantInvite"
                      | "KickMembers"
                      | "BanMembers"
                      | "Administrator"
                      | "ManageChannels"
                      | "ManageGuild"
                      | "AddReactions"
                      | "ViewAuditLog"
                      | "PrioritySpeaker"
                      | "Stream"
                      | "ViewChannel"
                      | "SendMessages"
                      | "SendTTSMessages"
                      | "ManageMessages"
                      | "EmbedLinks"
                      | "AttachFiles"
                      | "ReadMessageHistory"
                      | "MentionEveryone"
                      | "UseExternalEmojis"
                      | "ViewGuildInsights"
                      | "Connect"
                      | "Speak"
                      | "MuteMembers"
                      | "DeafenMembers"
                      | "MoveMembers"
                      | "UseVAD"
                      | "ChangeNickname"
                      | "ManageNicknames"
                      | "ManageRoles"
                      | "ManageWebhooks"
                      | "ManageEmojisAndStickers"
                      | "ManageGuildExpressions"
                      | "UseApplicationCommands"
                      | "RequestToSpeak"
                      | "ManageEvents"
                      | "ManageThreads"
                      | "CreatePublicThreads"
                      | "CreatePrivateThreads"
                      | "UseExternalStickers"
                      | "SendMessagesInThreads"
                      | "UseEmbeddedActivities"
                      | "ModerateMembers"
                      | "ViewCreatorMonetizationAnalytics"
                      | "UseSoundboard"
                      | "CreateGuildExpressions"
                      | "CreateEvents"
                      | "UseExternalSounds"
                      | "SendVoiceMessages"
                      | "SendPolls"
                      | "UseExternalApps",
                      bigint,
                  >,
              >,
          >
          | Readonly<
              BitField<
                  | "CreateInstantInvite"
                  | "KickMembers"
                  | "BanMembers"
                  | "Administrator"
                  | "ManageChannels"
                  | "ManageGuild"
                  | "AddReactions"
                  | "ViewAuditLog"
                  | "PrioritySpeaker"
                  | "Stream"
                  | "ViewChannel"
                  | "SendMessages"
                  | "SendTTSMessages"
                  | "ManageMessages"
                  | "EmbedLinks"
                  | "AttachFiles"
                  | "ReadMessageHistory"
                  | "MentionEveryone"
                  | "UseExternalEmojis"
                  | "ViewGuildInsights"
                  | "Connect"
                  | "Speak"
                  | "MuteMembers"
                  | "DeafenMembers"
                  | "MoveMembers"
                  | "UseVAD"
                  | "ChangeNickname"
                  | "ManageNicknames"
                  | "ManageRoles"
                  | "ManageWebhooks"
                  | "ManageEmojisAndStickers"
                  | "ManageGuildExpressions"
                  | "UseApplicationCommands"
                  | "RequestToSpeak"
                  | "ManageEvents"
                  | "ManageThreads"
                  | "CreatePublicThreads"
                  | "CreatePrivateThreads"
                  | "UseExternalStickers"
                  | "SendMessagesInThreads"
                  | "UseEmbeddedActivities"
                  | "ModerateMembers"
                  | "ViewCreatorMonetizationAnalytics"
                  | "UseSoundboard"
                  | "CreateGuildExpressions"
                  | "CreateEvents"
                  | "UseExternalSounds"
                  | "SendVoiceMessages"
                  | "SendPolls"
                  | "UseExternalApps",
                  bigint,
              >,
          >

    Returns void

  • get execute(): (
        guards: GuardFunction[],
        ...params: unknown[],
    ) => Promise<unknown>
  • Compiled methods executes all the guards and the main method

    compiledMethod = async (params: ArgsOf<any>, client: Client) => {
    guard1(params, client)
    guard2(params, client)
    guard3(params, client)
    main(params, client)
    }

    Returns (guards: GuardFunction[], ...params: unknown[]) => Promise<unknown>

  • get from(): Record<string, any>
  • Gets or sets the originating class reference.

    Returns Record<string, any>

  • set from(value: Record<string, any>): void
  • Parameters

    • value: Record<string, any>

    Returns void

  • get index(): undefined | number
  • Gets the index of the parameter being decorated, if applicable.

    Returns undefined | number

  • get isClass(): boolean
  • Determines if the target is a class.

    Returns boolean

  • get key(): string
  • Gets the key of the property or method being decorated.

    Returns string

  • get method(): undefined | Record<string, any>
  • Gets the method descriptor if the target is a method.

    Returns undefined | Record<string, any>

Methods

  • Applies the decoration to the specified target.

    Parameters

    • classRef: Record<string, any>

      The class reference.

    • key: string

      The property key.

    • Optionalmethod: Record<string, any>

      The method descriptor.

    • Optionalfrom: Record<string, any>

      The originating class reference.

    • Optionalindex: number

      The parameter index.

    Returns this

    The current instance.

  • Decorates an unknown type (class, method, or property).

    Parameters

    • classRef: Record<string, any>

      The class reference.

    • Optionalkey: string

      The property key.

    • Optionalmethod: PropertyDescriptor

      The method descriptor.

    • Optionalindex: number

      The parameter index.

    Returns this

    The current instance.