//Channels public Task <IReadOnlyCollection <RestGuildChannel> > GetChannelsAsync(RequestOptions options = null) => GuildHelper.GetChannelsAsync(this, Discord, options);
public async Task <IReadOnlyCollection <RestVoiceChannel> > GetVoiceChannelsAsync(RequestOptions options = null) { var channels = await GuildHelper.GetChannelsAsync(this, Discord, options).ConfigureAwait(false); return(channels.Select(x => x as RestVoiceChannel).Where(x => x != null).ToImmutableArray()); }
/// <summary> /// Gets a collection of all category channels in this guild. /// </summary> /// <param name="options">The options to be used when sending the request.</param> /// <returns> /// A task that represents the asynchronous get operation. The task result contains a read-only collection of /// category channels found within this guild. /// </returns> public async Task <IReadOnlyCollection <RestCategoryChannel> > GetCategoryChannelsAsync(RequestOptions options = null) { var channels = await GuildHelper.GetChannelsAsync(this, Discord, options).ConfigureAwait(false); return(channels.OfType <RestCategoryChannel>().ToImmutableArray()); }