Add Guild#prune (#723)

* make all changes neat

* run docs build
This commit is contained in:
Gus Caplan
2016-09-21 14:57:14 -05:00
committed by Schuyler Cebulskie
parent 529d7207da
commit 15d7f8e2fe
3 changed files with 31 additions and 1 deletions

View File

@@ -507,6 +507,15 @@ class RESTMethods {
}).catch(reject);
});
}
pruneGuildMembers(guild, days, dry) {
return new Promise((resolve, reject) => {
this.rest.makeRequest(dry ? 'get' : 'post', `${Constants.Endpoints.guildPrune(guild.id)}?days=${days}`, true)
.then(data => {
resolve(data.pruned);
}).catch(reject);
});
}
}
module.exports = RESTMethods;