mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 04:31:05 +00:00
Webpack build for branch master: 47bc0fc51e
This commit is contained in:
parent
af461110cc
commit
f68f42b3c9
2 changed files with 16 additions and 1 deletions
|
|
@ -4121,6 +4121,21 @@ class GuildChannel extends Channel {
|
||||||
.then(invite => new Invite(this.client, invite));
|
.then(invite => new Invite(this.client, invite));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetches a collection of invites to this guild channel.
|
||||||
|
* Resolves with a collection mapping invites by their codes.
|
||||||
|
* @returns {Promise<Collection<string, Invite>>}
|
||||||
|
*/
|
||||||
|
async fetchInvites() {
|
||||||
|
const inviteItems = await this.client.api.channels(this.id).invites.get();
|
||||||
|
const invites = new Collection();
|
||||||
|
for (const inviteItem of inviteItems) {
|
||||||
|
const invite = new Invite(this.client, inviteItem);
|
||||||
|
invites.set(invite.code, invite);
|
||||||
|
}
|
||||||
|
return invites;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clones this channel.
|
* Clones this channel.
|
||||||
* @param {Object} [options] The options
|
* @param {Object} [options] The options
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue