Fix ban message delete days

This commit is contained in:
Amish Shah
2017-05-01 14:57:27 +01:00
parent db45d99d0c
commit 0f4983852e

View File

@@ -682,9 +682,9 @@ class Guild {
*/ */
ban(user, options = {}) { ban(user, options = {}) {
if (typeof options === 'number') { if (typeof options === 'number') {
options = { reason: null, days: options }; options = { reason: null, 'delete-message-days': options };
} else if (typeof options === 'string') { } else if (typeof options === 'string') {
options = { reason: options, days: 0 }; options = { reason: options, 'delete-message-days': 0 };
} }
return this.client.rest.methods.banGuildMember(this, user, options); return this.client.rest.methods.banGuildMember(this, user, options);
} }