getUserOrFail method

User getUserOrFail(
  1. String optionName
)

Returns an instance of User if the command has the designed option

Example :

final User user = interaction.getUserOrFail('option_name');

Implementation

User getUserOrFail (String optionName) {
  final MineralClient client = ioc.use<MineralClient>();
  return client.users.cache.getOrFail(params[optionName]);
}