getChannelOrFail<T extends PartialTextChannel> method
Returns an instance of PartialTextChannel if the command has the designed option
Example :
final Channel channel = interaction.getChannelOrFail('option_name');
Implementation
T getChannelOrFail<T extends PartialTextChannel> (String optionName) {
return guild!.channels.cache.getOrFail(params[optionName]);
}