getConfirmation abstract method Null safety

Future<bool> getConfirmation(
  1. MessageBuilder message,
  2. {bool authorOnly = true,
  3. Duration? timeout = const Duration(minutes: 12),
  4. String confirmMessage = 'Yes',
  5. String denyMessage = 'No'}
)

Send a message prompting a user for confirmation, then return whether the user accepted the choice.

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.

confirmMessage and denyMessage can be set to change the text displayed on the "confirm" and "deny" buttons.

Implementation

Future<bool> getConfirmation(MessageBuilder message,
    {bool authorOnly = true,
    Duration? timeout = const Duration(minutes: 12),
    String confirmMessage = 'Yes',
    String denyMessage = 'No'});