getConfirmation abstract method Null safety
- MessageBuilder message,
- {bool authorOnly = true,
- Duration? timeout = const Duration(minutes: 12),
- String confirmMessage = 'Yes',
- 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'});