getStringOrFail method

String getStringOrFail(
  1. 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();
}