public async Task <RestGuildChannel> GetEmbedChannelAsync(RequestOptions options = null) { var embedId = EmbedChannelId; if (embedId.HasValue) { return(await GuildHelper.GetChannelAsync(this, Discord, embedId.Value, options).ConfigureAwait(false)); } return(null); }
public async Task <RestTextChannel> GetSystemChannelAsync(RequestOptions options = null) { var systemId = SystemChannelId; if (systemId.HasValue) { var channel = await GuildHelper.GetChannelAsync(this, Discord, systemId.Value, options).ConfigureAwait(false); return(channel as RestTextChannel); } return(null); }
public async Task <RestVoiceChannel> GetAFKChannelAsync(RequestOptions options = null) { var afkId = AFKChannelId; if (afkId.HasValue) { var channel = await GuildHelper.GetChannelAsync(this, Discord, afkId.Value, options).ConfigureAwait(false); return(channel as RestVoiceChannel); } return(null); }
public async Task <RestVoiceChannel> GetVoiceChannelAsync(ulong id, RequestOptions options = null) { var channel = await GuildHelper.GetChannelAsync(this, Discord, id, options).ConfigureAwait(false); return(channel as RestVoiceChannel); }
public Task <RestGuildChannel> GetChannelAsync(ulong id, RequestOptions options = null) => GuildHelper.GetChannelAsync(this, Discord, id, options);
public async Task <RestTextChannel> GetDefaultChannelAsync(RequestOptions options = null) { var channel = await GuildHelper.GetChannelAsync(this, Discord, DefaultChannelId, options).ConfigureAwait(false); return(channel as RestTextChannel); }