Functionseedcordv0.13.0Decorator
ModalRoute
Routes modal submissions to handler classes.
Pass the CustomIdCustomId 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, so an older-shape wire still reaches the handler and throws StaleCustomId on read, the same as a button route.
ModalRoute<Defs>(
defs: Defs
): <
TCtor extends new (
...args: any[]
) => InteractionHandler<Repliables> & HasComponentDefs<Defs>
>(
constructor: AssertHandles<ModalSubmitInteraction, TCtor>
) => voidModalRoute<Defs>(
defs: Defs
): <
TCtor extends new (
...args: any[]
) => InteractionHandler<Repliables> & HasComponentDefs<Defs>
>(
constructor: AssertHandles<ModalSubmitInteraction, TCtor>
) => voidDefs
DefsDefsdefs
defs: Defsdefs: DefsThe customId definition(s) this handler decodes, one per route.