mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Prettified Code!
This commit is contained in:
@@ -10,10 +10,7 @@ import { snakelize } from "../../util/utils.ts";
|
||||
*
|
||||
* By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the roles (resolved to include_roles internally) parameter. Any inactive user that has a subset of the provided role(s) will be included in the prune and users with additional roles will not.
|
||||
*/
|
||||
export async function pruneMembers(
|
||||
guildId: bigint,
|
||||
options: BeginGuildPrune,
|
||||
) {
|
||||
export async function pruneMembers(guildId: bigint, options: BeginGuildPrune) {
|
||||
if (options.days && options.days < 1) throw new Error(Errors.PRUNE_MIN_DAYS);
|
||||
if (options.days && options.days > 30) throw new Error(Errors.PRUNE_MAX_DAYS);
|
||||
|
||||
@@ -22,7 +19,7 @@ export async function pruneMembers(
|
||||
const result = await rest.runMethod<{ pruned: number }>(
|
||||
"post",
|
||||
endpoints.GUILD_PRUNE(guildId),
|
||||
snakelize(options),
|
||||
snakelize(options)
|
||||
);
|
||||
|
||||
return result.pruned;
|
||||
|
||||
Reference in New Issue
Block a user