Skip to content

Commit

Permalink
feat(Integration): add scopes (#8483)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Sep 4, 2022
1 parent d08a57c commit 8b3d006
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/discord.js/src/structures/Integration.js
Expand Up @@ -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 ??= [];
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.d.ts
Expand Up @@ -1450,6 +1450,7 @@ export class Integration extends Base {
public role: Role | null;
public enableEmoticons: boolean | null;
public get roles(): Collection<Snowflake, Role>;
public scopes: OAuth2Scopes[];
public get syncedAt(): Date | null;
public syncedTimestamp: number | null;
public syncing: boolean | null;
Expand Down

0 comments on commit 8b3d006

Please sign in to comment.