mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix ban message delete days
This commit is contained in:
@@ -682,9 +682,9 @@ class Guild {
|
||||
*/
|
||||
ban(user, options = {}) {
|
||||
if (typeof options === 'number') {
|
||||
options = { reason: null, days: options };
|
||||
options = { reason: null, 'delete-message-days': options };
|
||||
} 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user