getBoolean method Null safety
- 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'];
}