public async Task <ICategoryChannel> GetCategoryAsync() { if (CategoryId.HasValue) { return((await Guild.GetChannelAsync(CategoryId.Value).ConfigureAwait(false)) as ICategoryChannel); } return(null); }
// INestedChannel /// <inheritdoc /> async Task <ICategoryChannel> INestedChannel.GetCategoryAsync(CacheMode mode, RequestOptions options) { if (CategoryId.HasValue && mode == CacheMode.AllowDownload) { return((await Guild.GetChannelAsync(CategoryId.Value, mode, options).ConfigureAwait(false)) as ICategoryChannel); } return(null); }
public async Task <ICategoryChannel> GetCategory() => CategoryId == null ? null : await Guild.GetChannelAsync(CategoryId.Value) as ICategoryChannel;