resolveChannel<T extends Channel> method
Resolves the channel where the typing occurred.
Example:
client.events.typing((Typing typing) async {
final channel = await typing.resolveChannel<TextChannel>();
print('Someone is typing in #${channel?.name}');
});
Parameters:
forceWhether to force fetch the channel from the API instead of cache. Defaults to false.TThe type of channel to resolve. Must extend Channel.
Implementation
Future<T> resolveChannel<T extends Channel>({bool force = false}) async {
final channel = await _datastore.channel.get<T>(channelId.value, force);
return channel!;
}