seyfert
    Preparing search index...

    Interface GuildModalContext<M>

    interface GuildModalContext<M extends keyof RegisteredMiddlewares = never> {
        author: User;
        channelId: string;
        client: UsingClient;
        command: ModalCommand;
        components: {
            components: { customId: string; type: ComponentType; value: string }[];
            type: ActionRow;
        }[];
        customId: string;
        globalMetadata: GlobalMetadata;
        guildId: string;
        interaction: ModalSubmitInteraction;
        member: InteractionGuildMember;
        metadata: CommandMetadata<UnionToTuple<M, []>>;
        proxy: APIRoutes;
        t: __InternalParseLocale<DefaultLocale> & {
            get(locale?: string): DefaultLocale;
        };
        channel(mode?: "rest" | "flow"): Promise<AllChannels>;
        channel(mode: "cache"): ReturnCache<AllChannels>;
        deferReply<FR extends boolean = false>(
            ephemeral?: boolean,
            fetchReply?: FR,
        ): Promise<When<FR, WebhookMessage, undefined>>;
        deleteResponse(): Promise<void>;
        editOrReply<FR extends boolean = false>(
            body:
                | Omit<
                    APIInteractionResponseCallbackData,
                    "components"
                    | "content"
                    | "embeds"
                    | "poll",
                > & SendResolverProps
                | InteractionMessageUpdateBodyRequest,
            fetchReply?: FR,
        ): Promise<When<FR, WebhookMessage, void>>;
        editResponse(
            body: InteractionMessageUpdateBodyRequest,
        ): Promise<WebhookMessage>;
        fetchResponse(): Promise<WebhookMessage>;
        followup(
            body: Omit<
                RESTPostAPIWebhookWithTokenJSONBody,
                "components"
                | "content"
                | "embeds"
                | "poll",
            > & SendResolverProps,
        ): Promise<WebhookMessage>;
        guild(mode?: "rest" | "flow"): Promise<Guild<"cached" | "api">>;
        guild(mode: "cache"): ReturnCache<undefined | Guild<"cached">>;
        inGuild(): this is GuildModalContext<M>;
        isButton(): this is ComponentContext<"Button", never>;
        isChannelSelectMenu(): this is ComponentContext<"ChannelSelect", never>;
        isChat(): this is CommandContext<{}, never>;
        isComponent(): this is ComponentContext<
            keyof ContextComponentCommandInteractionMap,
            never,
        >;
        isEntryPoint(): this is EntryPointContext<never>;
        isMentionableSelectMenu(): this is ComponentContext<
            "MentionableSelect",
            never,
        >;
        isMenu(): this is MenuCommandContext<
            UserCommandInteraction<boolean>
            | MessageCommandInteraction<boolean>,
            never,
        >;
        isMenuMessage(): this is MenuCommandContext<
            MessageCommandInteraction<boolean>,
            never,
        >;
        isMenuUser(): this is MenuCommandContext<
            UserCommandInteraction<boolean>,
            never,
        >;
        isModal(): this is ModalContext<M>;
        isRoleSelectMenu(): this is ComponentContext<"RoleSelect", never>;
        isStringSelectMenu(): this is ComponentContext<"StringSelect", never>;
        isUserSelectMenu(): this is ComponentContext<"UserSelect", never>;
        me(mode?: "rest" | "flow"): Promise<GuildMember>;
        me(mode: "cache"): ReturnCache<undefined | GuildMember>;
        modal(
            body: ModalCreateBodyRequest,
            options?: undefined,
        ): Promise<undefined>;
        modal(
            body: ModalCreateBodyRequest,
            options: ModalCreateOptions,
        ): Promise<null | ModalSubmitInteraction<boolean>>;
        write<FR extends boolean = false>(
            body: Omit<
                APIInteractionResponseCallbackData,
                "components"
                | "content"
                | "embeds"
                | "poll",
            > & SendResolverProps,
            fetchReply?: FR,
        ): Promise<When<FR, WebhookMessage, void>>;
    }

    Type Parameters

    Hierarchy

    • Omit<MakeRequired<ModalContext<M>, "guildId" | "member">, "guild" | "me">
      • GuildModalContext
    Index

    Properties

    author: User
    channelId: string
    client: UsingClient

    The UsingClient instance.

    command: ModalCommand
    components: {
        components: { customId: string; type: ComponentType; value: string }[];
        type: ActionRow;
    }[]
    customId: string
    globalMetadata: GlobalMetadata = {}
    guildId: string

    The component interaction object.

    metadata: CommandMetadata<UnionToTuple<M, []>> = ...
    proxy: APIRoutes
    t: __InternalParseLocale<DefaultLocale> & {
        get(locale?: string): DefaultLocale;
    }

    Methods

    • Defers the reply to the interaction.

      Type Parameters

      • FR extends boolean = false

      Parameters

      • ephemeral: boolean = false

        Whether the reply should be ephemeral or not.

      • OptionalfetchReply: FR

      Returns Promise<When<FR, WebhookMessage, undefined>>

    • Deletes the response of the interaction.

      Returns Promise<void>

      A promise that resolves when the response is deleted.

    • Edits the response or replies to the interaction.

      Type Parameters

      • FR extends boolean = false

      Parameters

      • body:
            | Omit<
                APIInteractionResponseCallbackData,
                "components"
                | "content"
                | "embeds"
                | "poll",
            > & SendResolverProps
            | InteractionMessageUpdateBodyRequest

        The body of the response or updated body of the interaction.

      • OptionalfetchReply: FR

        Whether to fetch the reply or not.

      Returns Promise<When<FR, WebhookMessage, void>>

    • Edits the response of the interaction.

      Parameters

      • body: InteractionMessageUpdateBodyRequest

        The updated body of the response.

      Returns Promise<WebhookMessage>

    • Parameters

      • body: Omit<
            RESTPostAPIWebhookWithTokenJSONBody,
            "components"
            | "content"
            | "embeds"
            | "poll",
        > & SendResolverProps

      Returns Promise<WebhookMessage>

    • Writes a response to the interaction.

      Type Parameters

      • FR extends boolean = false

      Parameters

      • body: Omit<
            APIInteractionResponseCallbackData,
            "components"
            | "content"
            | "embeds"
            | "poll",
        > & SendResolverProps

        The body of the response.

      • OptionalfetchReply: FR

        Whether to fetch the reply or not.

      Returns Promise<When<FR, WebhookMessage, void>>