Modal
import { Modal, TextInput } from 'discord-hono'
const modal = new Modal('unique-id', 'Title').row( new TextInput('custom_id', 'Label'),).row()
Section titled “.row()”const modal = new Modal('unique-id', 'Modal Title') .row(new TextInput('text-1', 'Label')) .row(new TextInput('text-2', 'MultiInput', 'Multi')).row() has the same feature as Action Rows.
TextInput
Section titled “TextInput”import { Modal, TextInput } from 'discord-hono'
type Style = 'Single' | 'Multi'
const modal = new Modal('unique-id', 'Modal Title') .row(new TextInput('text-1', 'Label')) .row(new TextInput('custom_id', 'MultiInput', 'Multi' as Style))The third argument specifies the style of the TextInput. The default is Single.
Method
Section titled “Method”const modal = new Modal('unique-id', 'Modal Title').row( new TextInput('custom_id', 'Label') .min_length() .max_length() .required() .value() .placeholder(),)Please refer to the Official Docs.