Exemplo n.º 1
0
        public static async Task <RestVoiceRegion> GetVoiceRegionAsync(BaseDiscordClient client,
                                                                       string id, RequestOptions options)
        {
            var models = await client.ApiClient.GetVoiceRegionsAsync(options).ConfigureAwait(false);

            return(models.Select(x => RestVoiceRegion.Create(client, x)).FirstOrDefault(x => x.Id == id));
        }
Exemplo n.º 2
0
        //Voice Regions
        public static async Task <IReadOnlyCollection <RestVoiceRegion> > GetVoiceRegionsAsync(IGuild guild, BaseDiscordClient client,
                                                                                               RequestOptions options)
        {
            var models = await client.ApiClient.GetGuildVoiceRegionsAsync(guild.Id, options).ConfigureAwait(false);

            return(models.Select(x => RestVoiceRegion.Create(client, x)).ToImmutableArray());
        }
Exemplo n.º 3
0
        public static async Task <IReadOnlyCollection <RestVoiceRegion> > GetVoiceRegionsAsync(BaseDiscordClient client)
        {
            var models = await client.ApiClient.GetVoiceRegionsAsync().ConfigureAwait(false);

            return(models.Select(x => RestVoiceRegion.Create(client, x)).ToImmutableArray());
        }