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