mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
feat(Guild): add includeApplications option for fetchIntegrations (#4762)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
const IntegrationApplication = require('./IntegrationApplication');
|
||||
|
||||
/**
|
||||
* The information account for an integration
|
||||
@@ -92,6 +93,20 @@ class Integration extends Base {
|
||||
* @type {number}
|
||||
*/
|
||||
this.expireGracePeriod = data.expire_grace_period;
|
||||
|
||||
if ('application' in data) {
|
||||
if (this.application) {
|
||||
this.application._patch(data.application);
|
||||
} else {
|
||||
/**
|
||||
* The application for this integration
|
||||
* @type {?IntegrationApplication}
|
||||
*/
|
||||
this.application = new IntegrationApplication(this.client, data.application);
|
||||
}
|
||||
} else if (!this.application) {
|
||||
this.application = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user