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