mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
added a new Typedef for Bans you can get from <Guild>.fetchBans() and fixed a little typo in the fetchAuditLogs() method (#2108)
* added a new Typedef for Bans you can get from <Guild>.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
This commit is contained in:
committed by
Schuyler Cebulskie
parent
77fc046550
commit
134ef7a61b
@@ -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<Collection<Snowflake, Object>>}
|
||||
* @returns {Promise<Collection<Snowflake, BanInfo>>}
|
||||
*/
|
||||
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<GuildAuditLogs>}
|
||||
*/
|
||||
fetchAuditLogs(options = {}) {
|
||||
|
||||
Reference in New Issue
Block a user