mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 13:32:04 +00:00
Update Invite.js (#1496)
This commit is contained in:
parent
4955b1ce5f
commit
3fa87de594
1 changed files with 18 additions and 27 deletions
|
|
@ -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>
|
||||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue