getStringOrFail method Null safety
- String optionName
Returns an String if the command has the designed option
Example :
final String str = interaction.getStringOrFail('option_name');
Implementation
String getStringOrFail (String optionName) {
return params[optionName].toString();
}