getButtonPress abstract method Null safety
- Iterable<
ButtonBuilder> buttons, - {bool authorOnly = true,
- Duration? timeout = const Duration(minutes: 12)}
Wait for a user to press on a button, then return the result of that interaction.
This method specifically listens for interactions on items of buttons
, ignoring other button
presses.
If authorOnly
is true
, only events triggered by the author of this context will be
returned, but other interactions will still be acknowledged.
If timeout
is set, this method will complete with an error after timeout
.
You might also be interested in:
- getConfirmation, a shortcut for getting user confirmation from buttons.
Implementation
Future<IButtonInteractionEvent> getButtonPress(Iterable<ButtonBuilder> buttons,
{bool authorOnly = true, Duration? timeout = const Duration(minutes: 12)});