getString method Null safety
- String optionName
Returns an String if the command has the designed option
Example :
String? str = interaction.getString('option_name');
Implementation
String? getString (String optionName) {
return data[optionName]?['value'];
}