Exemple #1
0
        //Bans
        public static async Task <IReadOnlyCollection <RestBan> > GetBansAsync(IGuild guild, BaseDiscordClient client,
                                                                               RequestOptions options)
        {
            var models = await client.ApiClient.GetGuildBansAsync(guild.Id, options).ConfigureAwait(false);

            return(models.Select(x => RestBan.Create(client, x)).ToImmutableArray());
        }
Exemple #2
0
        public static async Task <RestBan> GetBanAsync(IGuild guild, BaseDiscordClient client, ulong userId, RequestOptions options)
        {
            var model = await client.ApiClient.GetGuildBanAsync(guild.Id, userId, options).ConfigureAwait(false);

            return(RestBan.Create(client, model));
        }