Skip to content

Commit

Permalink
feat(Integration): add scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Aug 12, 2022
1 parent 8e69efd commit 4c54754
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
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ class Integration extends Base {
} else {
this.application ??= null;
}

if ('scopes' in data) {
/**
* The scopes the application has been authorized for
* @type {?OAuth2Scopes[]}
*/
this.scopes = data.scopes;
} else {
this.scopes ??= null;
}
}

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

0 comments on commit 4c54754

Please sign in to comment.