discord-emcee

Home > @johndavisdev/discord-emcee > promptModal

promptModal() function

Prompt a Discord user information via a MessageComponent.

Signature:

declare function promptModal<TShape extends sb.ModalRawShape = sb.ModalRawShape, Output extends ObjectOutput<TShape> = ObjectOutput<TShape>>(schema: sb.ModalSchema<TShape>, uiOptions: ModalPromptOptions, interaction: ChatInputCommandInteraction): Promise<Output>;

Parameters

Parameter Type Description
schema sb.ModalSchema<TShape> the schema for the data you’re trying to get from the user
uiOptions ModalPromptOptions rendering options
interaction ChatInputCommandInteraction the Discord interaction object

Returns:

Promise<Output>

a value staisfying the schema (as a Promise)