docs(GuildMemberManager): fix docs for #search() (#5784)

This commit is contained in:
Jan
2021-06-09 14:15:53 +02:00
committed by GitHub
parent e798fb720e
commit 0139e102e3
2 changed files with 29 additions and 16 deletions

View File

@@ -120,12 +120,17 @@ class GuildBanManager extends BaseManager {
return data.reduce((col, ban) => col.set(ban.user.id, this.add(ban, cache)), new Collection());
}
/**
* Options for banning a user.
* @typedef {Object} BanOptions
* @property {number} [days] Number of days of messages to delete, must be between 0 and 7, inclusive
* @property {string} [reason] Reason for banning
*/
/**
* Bans a user from the guild.
* @param {UserResolvable} user The user to ban
* @param {Object} [options] Options for the ban
* @param {number} [options.days=0] Number of days of messages to delete, must be between 0 and 7, inclusive
* @param {string} [options.reason] Reason for banning
* @param {BanOptions} [options] Options for the ban
* @returns {Promise<GuildMember|User|Snowflake>} Result object will be resolved as specifically as possible.
* If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot
* be resolved, the user ID will be the result.