mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
Fix ban message delete days
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user