Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 749 Bytes

File metadata and controls

19 lines (12 loc) · 749 Bytes

Button

Declares a class or method as the handler for a button press.

use Tempcord\Attributes\Button;

Applies to: class, method

Parameters

Name Type Default Description
id BackedEnum|string|null null the button's custom id. It may carry {placeholders}, as in "tournament.accept.{team}", which are matched out of the incoming id and passed to same-named parameters. Defaults to the class name with a Button prefix or suffix stripped and the rest snake_cased.
middleware array [] run in the order given, outermost first; any of them may answer instead of letting the handler run