示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
 public Task <RestGuildChannel> GetChannelAsync(ulong id, RequestOptions options = null)
 => GuildHelper.GetChannelAsync(this, Discord, id, options);
示例#6
0
        public async Task <RestTextChannel> GetDefaultChannelAsync(RequestOptions options = null)
        {
            var channel = await GuildHelper.GetChannelAsync(this, Discord, DefaultChannelId, options).ConfigureAwait(false);

            return(channel as RestTextChannel);
        }