getChannel<T extends PartialTextChannel> method
Returns an instance of PartialTextChannel 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(data[optionName]?['value']);
}