getButtonPress abstract method Null safety

Future<IButtonInteractionEvent> getButtonPress(
  1. Iterable<ButtonBuilder> buttons,
  2. {bool authorOnly = true,
  3. 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:

Implementation

Future<IButtonInteractionEvent> getButtonPress(Iterable<ButtonBuilder> buttons,
    {bool authorOnly = true, Duration? timeout = const Duration(minutes: 12)});