public async Task <IActionResult> PruneGuildMembersAsync(Snowflake guildId, [FromQuery] Dictionary <string, string> queryMap) { var args = new GuildPruneParams(0); args.LoadQueryMap(queryMap); args.Validate(); return(Ok(new GuildPruneCountResponse())); }
public static async Task <int> PruneUsersAsync(IGuild guild, BaseDiscordClient client, int days, bool simulate, RequestOptions options) { var args = new GuildPruneParams(days); GetGuildPruneCountResponse model; if (simulate) { model = await client.ApiClient.GetGuildPruneCountAsync(guild.Id, args, options).ConfigureAwait(false); } else { model = await client.ApiClient.BeginGuildPruneAsync(guild.Id, args, options).ConfigureAwait(false); } return(model.Pruned); }
public async Task <int> PruneUsersAsync(int days = 30, bool simulate = false) { var args = new GuildPruneParams() { Days = days }; GetGuildPruneCountResponse model; if (simulate) { model = await Discord.ApiClient.GetGuildPruneCountAsync(Id, args).ConfigureAwait(false); } else { model = await Discord.ApiClient.BeginGuildPruneAsync(Id, args).ConfigureAwait(false); } return(model.Pruned); }