getBoolean method

bool? getBoolean(
  1. String optionName
)

Returns an bool if the command has the designed option

Example :

book? boolean = interaction.getBoolean('option_name');

Implementation

bool? getBoolean (String optionName) {
  return data[optionName]?['value'];
}