Webpack build for branch master: fce15ba33c

This commit is contained in:
Travis CI 2017-05-21 20:09:22 +00:00
parent 8817153db5
commit 83373dcdbd
2 changed files with 8 additions and 8 deletions

View file

@ -6202,7 +6202,7 @@ class Guild {
*/
leave() {
if (this.ownerID === this.client.user.id) return Promise.reject(new Error('Guild is owned by the client.'));
return this.rest.api.users('@me').guilds(this.id).delete()
return this.client.api.users('@me').guilds(this.id).delete()
.then(() => this.client.actions.GuildDelete.handle({ id: this.id }).guild);
}
@ -8098,7 +8098,7 @@ class TextBasedChannel {
Date.now() - Snowflake.deconstruct(id).date.getTime() < 1209600000
);
}
return this.rest.api.channels(this.id).messages['bulk-delete']
return this.client.api.channels(this.id).messages()['bulk-delete']
.post({ data: { messages: messageIDs } })
.then(() =>
this.client.actions.MessageDeleteBulk.handle({
@ -8117,7 +8117,7 @@ class TextBasedChannel {
*/
acknowledge() {
if (!this.lastMessageID) return Promise.resolve(this);
return this.client.api.channels(this.id).messages(this.lastMessageID)
return this.client.api.channels(this.id).messages(this.lastMessageID).ack
.post({ data: { token: this.client.rest._ackToken } })
.then(res => {
if (res.token) this.client.rest._ackToken = res.token;
@ -8500,10 +8500,10 @@ class GuildChannel extends Channel {
* kicked after 24 hours if they have not yet received a role
* @param {number} [options.maxAge=86400] How long the invite should last (in seconds, 0 for forever)
* @param {number} [options.maxUses=0] Maximum number of uses
* @param {string} [reason] Reason for creating this
* @param {string} [options.reason] Reason for creating this
* @returns {Promise<Invite>}
*/
createInvite({ temporary = false, maxAge = 86400, maxUses = 0 }, reason) {
createInvite({ temporary = false, maxAge = 86400, maxUses = 0, reason } = {}) {
return this.client.api.channels(this.id).invites.post({ data: {
temporary, max_age: maxAge, max_uses: maxUses,
}, reason })
@ -17617,7 +17617,7 @@ class Client extends EventEmitter {
* @returns {Collection<string, VoiceRegion>}
*/
fetchVoiceRegions() {
return this.rest.api.voice.regions.get().then(res => {
return this.api.voice.regions.get().then(res => {
const regions = new Collection();
for (const region of res) regions.set(region.id, new VoiceRegion(region));
return regions;

File diff suppressed because one or more lines are too long