From 134ef7a61b6d0c9c8ec23fc13a0a7e1b00295b5e Mon Sep 17 00:00:00 2001 From: Yukine Date: Thu, 30 Nov 2017 05:36:03 +0100 Subject: [PATCH] added a new Typedef for Bans you can get from .fetchBans() and fixed a little typo in the fetchAuditLogs() method (#2108) * added a new Typedef for Bans you can get from .fetchBans() due recent change aswell as fixed a little typo in the fetchAuditLogs() mehtod so .type has no the correct type defined * little change due request * fixed indentation * Update Guild.js * Update Guild.js --- src/structures/Guild.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index fb6a6eed3..307e5eda2 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -441,10 +441,16 @@ class Guild extends Base { return this.members.resolve(user); } + /** + * An object containing information about a guild member's ban. + * @typedef {Object} BanInfo + * @property {User} user User that was banned + * @property {?string} reason Reason the user was banned + */ + /** * Fetches a collection of banned users in this guild. - * The returned collection contains user objects keyed under `user` and reasons keyed under `reason`. - * @returns {Promise>} + * @returns {Promise>} */ fetchBans() { return this.client.api.guilds(this.id).bans.get().then(bans => @@ -506,7 +512,7 @@ class Guild extends Base { * @param {Snowflake|GuildAuditLogsEntry} [options.after] Limit to entries from after specified entry * @param {number} [options.limit] Limit number of entries * @param {UserResolvable} [options.user] Only show entries involving this user - * @param {ActionType|number} [options.type] Only show entries involving this action type + * @param {AuditLogAction|number} [options.type] Only show entries involving this action type * @returns {Promise} */ fetchAuditLogs(options = {}) {