Example #1
0
 public async Task <ICategoryChannel> GetCategoryAsync()
 {
     if (CategoryId.HasValue)
     {
         return((await Guild.GetChannelAsync(CategoryId.Value).ConfigureAwait(false)) as ICategoryChannel);
     }
     return(null);
 }
Example #2
0
 // 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);
 }
Example #3
0
 public async Task <ICategoryChannel> GetCategory() => CategoryId == null ? null : await Guild.GetChannelAsync(CategoryId.Value) as ICategoryChannel;