Skip to content
Functioncorev0.10.0Decorator

ModalRoute

Routes modal submissions to handler classes.

Pass the CustomId definition(s) this handler decodes and list the same ones in the handler's generic. Passing different definitions to the decorator and the generic is a compile error. Routing matches the stable prefix here too, throwing StaleCustomId on read the same as a button route.

ModalRoute<Defs>(
    defs: Defs
): <TCtor extends AnyHandlerCtor>(
    constructor: AssertComponentRoute<InteractionKind.Modal, Defs, TCtor>
) => void

Defs

Defs

defs

defs: Defs

The customId definition(s) this handler decodes, one per route.