Skip to content

Commit

Permalink
Update Invite.js (#1496)
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek authored and iCrawl committed May 16, 2017
1 parent 4955b1c commit 3fa87de
Showing 1 changed file with 18 additions and 27 deletions.
45 changes: 18 additions & 27 deletions src/structures/Invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <warn>The only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.</warn>
Expand Down Expand Up @@ -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}
Expand All @@ -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}
Expand Down

0 comments on commit 3fa87de

Please sign in to comment.