mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
added Invite#presenceCount and Invite#memberCount (#1460)
* added Invite#online and Invite#memberCount * requested change
This commit is contained in:
@@ -54,6 +54,12 @@ class Invite {
|
||||
*/
|
||||
this.code = data.code;
|
||||
|
||||
/**
|
||||
* The approximate number of online members of the guild this invite is for
|
||||
* @type {number}
|
||||
*/
|
||||
this.presenceCount = data.approximate_presence_count;
|
||||
|
||||
/**
|
||||
* Whether or not this invite is temporary
|
||||
* @type {boolean}
|
||||
@@ -66,6 +72,12 @@ 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}
|
||||
|
||||
@@ -243,7 +243,7 @@ const Endpoints = exports.Endpoints = {
|
||||
toString: () => '/gateway',
|
||||
bot: '/gateway/bot',
|
||||
},
|
||||
Invite: inviteID => `/invite/${inviteID}`,
|
||||
Invite: inviteID => `/invite/${inviteID}?with_counts=true`,
|
||||
inviteLink: id => `https://discord.gg/${id}`,
|
||||
Webhook: (webhookID, token) => `/webhooks/${webhookID}${token ? `/${token}` : ''}`,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user