diff --git a/litecord/blueprints/guild/mod.py b/litecord/blueprints/guild/mod.py index cfbe003..7878d3b 100644 --- a/litecord/blueprints/guild/mod.py +++ b/litecord/blueprints/guild/mod.py @@ -176,7 +176,7 @@ async def get_guild_prune_count(guild_id): await guild_perm_check(user_id, guild_id, 'kick_members') - j = validate(await request.get_json(), GUILD_PRUNE) + j = validate(request.args, GUILD_PRUNE) days = j['days'] member_ids = await get_prune(guild_id, days) @@ -191,7 +191,7 @@ async def begin_guild_prune(guild_id): await guild_perm_check(user_id, guild_id, 'kick_members') - j = validate(await request.get_json(), GUILD_PRUNE) + j = validate(request.args, GUILD_PRUNE) days = j['days'] member_ids = await get_prune(guild_id, days) diff --git a/litecord/schemas.py b/litecord/schemas.py index 47ea60f..50e6d09 100644 --- a/litecord/schemas.py +++ b/litecord/schemas.py @@ -657,7 +657,8 @@ GUILD_SETTINGS = { } GUILD_PRUNE = { - 'days': {'type': 'number', 'coerce': int, 'min': 1} + 'days': {'type': 'number', 'coerce': int, 'min': 1, 'max': 30, 'default': 7}, + 'compute_prune_count': {'type': 'string', 'default': 'true'} } NEW_EMOJI = {