getChannel<T extends GuildChannel> 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 GuildChannel>(String optionName) {
return guild?.channels.cache.get(params[optionName]) as T;
}