diff --git a/packages/discord.js/src/structures/Integration.js b/packages/discord.js/src/structures/Integration.js index 1afc8f14aa32..d51dfbda8b73 100644 --- a/packages/discord.js/src/structures/Integration.js +++ b/packages/discord.js/src/structures/Integration.js @@ -185,6 +185,16 @@ class Integration extends Base { } else { this.application ??= null; } + + if ('scopes' in data) { + /** + * The scopes this application has been authorized for + * @type {OAuth2Scopes[]} + */ + this.scopes = data.scopes; + } else { + this.scopes ??= []; + } } /** diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 91a071d56748..c450df38fe44 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1450,6 +1450,7 @@ export class Integration extends Base { public role: Role | null; public enableEmoticons: boolean | null; public get roles(): Collection; + public scopes: OAuth2Scopes[]; public get syncedAt(): Date | null; public syncedTimestamp: number | null; public syncing: boolean | null;