mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
Update Invite.js (#1496)
This commit is contained in:
@@ -2,27 +2,6 @@ const PartialGuild = require('./PartialGuild');
|
|||||||
const PartialGuildChannel = require('./PartialGuildChannel');
|
const PartialGuildChannel = require('./PartialGuildChannel');
|
||||||
const Constants = require('../util/Constants');
|
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.
|
* Represents an invitation to a guild channel.
|
||||||
* <warn>The only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.</warn>
|
* <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;
|
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
|
* Whether or not this invite is temporary
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
@@ -72,12 +69,6 @@ class Invite {
|
|||||||
*/
|
*/
|
||||||
this.maxAge = data.max_age;
|
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
|
* How many times this invite has been used
|
||||||
* @type {number}
|
* @type {number}
|
||||||
|
|||||||
Reference in New Issue
Block a user