Webpack build for branch master: 47bc0fc51e

This commit is contained in:
Travis CI 2018-02-13 16:33:08 +00:00
parent af461110cc
commit f68f42b3c9
2 changed files with 16 additions and 1 deletions

View file

@ -4121,6 +4121,21 @@ class GuildChannel extends Channel {
.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.
* @param {Object} [options] The options

File diff suppressed because one or more lines are too long