mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
feat(Guild): add includeApplications option for fetchIntegrations (#4762)
This commit is contained in:
25
src/structures/IntegrationApplication.js
Normal file
25
src/structures/IntegrationApplication.js
Normal file
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
const Application = require('./interfaces/Application');
|
||||
|
||||
/**
|
||||
* Represents an Integration's OAuth2 Application.
|
||||
* @extends {Application}
|
||||
*/
|
||||
class IntegrationApplication extends Application {
|
||||
_patch(data) {
|
||||
super._patch(data);
|
||||
|
||||
if (typeof data.bot !== 'undefined') {
|
||||
/**
|
||||
* The bot {@link User user} for this application
|
||||
* @type {?User}
|
||||
*/
|
||||
this.bot = this.client.users.add(data.bot);
|
||||
} else if (!this.bot) {
|
||||
this.bot = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = IntegrationApplication;
|
||||
Reference in New Issue
Block a user