From ccdba11e93fd828c3177dcb06092e426dafa019e Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 16 May 2017 03:45:55 -0500 Subject: [PATCH] Update Invite.js --- src/structures/Invite.js | 45 ++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/src/structures/Invite.js b/src/structures/Invite.js index 995f9c57e4c4..cd9324b446f1 100644 --- a/src/structures/Invite.js +++ b/src/structures/Invite.js @@ -2,27 +2,6 @@ const PartialGuild = require('./PartialGuild'); const PartialGuildChannel = require('./PartialGuildChannel'); const Constants = require('../util/Constants'); -/* -{ max_age: 86400, - code: 'CG9A5', - guild: - { splash: null, - id: '123123123', - icon: '123123123', - name: 'name' }, - created_at: '2016-08-28T19:07:04.763368+00:00', - temporary: false, - uses: 0, - max_uses: 0, - inviter: - { username: '123', - discriminator: '4204', - bot: true, - id: '123123123', - avatar: '123123123' }, - channel: { type: 0, id: '123123', name: 'heavy-testing' } } -*/ - /** * Represents an invitation to a guild channel. * The only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing. @@ -60,6 +39,24 @@ class Invite { */ this.presenceCount = data.approximate_presence_count; + /** + * The approximate total number of members of the guild this invite is for + * @type {number} + */ + this.memberCount = data.approximate_member_count; + + /** + * The number of text channels the guild this invite goes to has + * @type {number} + */ + this.textChannelCount = data.guild.text_channel_count; + + /** + * The number of voice channels the guild this invite goes to has + * @type {number} + */ + this.voiceChannelCount = data.guild.voice_channel_count; + /** * Whether or not this invite is temporary * @type {boolean} @@ -72,12 +69,6 @@ class Invite { */ this.maxAge = data.max_age; - /** - * The approximate total number of members of the guild this invite is for - * @type {number} - */ - this.memberCount = data.approximate_member_count; - /** * How many times this invite has been used * @type {number}