Functionseedcordv0.14.0Decorator
ButtonRoute
Routes button interactions 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 a wire minted from an older shape still reaches the handler, where reading this.params throws StaleCustomId and the controller boundary turns it into a reply.
ButtonRoute<Defs>(
defs: Defs
): <
TCtor extends new (
...args: any[]
) => InteractionHandler<Repliables> & HasComponentDefs<Defs>
>(
constructor: AssertHandles<ButtonInteraction, TCtor>
) => voidButtonRoute<Defs>(
defs: Defs
): <
TCtor extends new (
...args: any[]
) => InteractionHandler<Repliables> & HasComponentDefs<Defs>
>(
constructor: AssertHandles<ButtonInteraction, TCtor>
) => voidDefs
DefsDefsdefs
defs: Defsdefs: DefsThe customId definition(s) this handler decodes, one per route.