Skip to content

Commit

Permalink
fix: target resolving and app constructing
Browse files Browse the repository at this point in the history
  • Loading branch information
almostSouji committed Apr 11, 2021
1 parent 2501bc9 commit 4fa4136
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/structures/GuildChannel.js
Expand Up @@ -514,7 +514,7 @@ class GuildChannel extends Channel {
max_uses: maxUses,
unique,
target_user_id: this.client.users.resolveID(targetUser),
target_application_id: targetApplication.id ?? targetApplication,
target_application_id: targetApplication?.applicationID ?? targetApplication,
target_type: targetType,
},
reason,
Expand Down
2 changes: 1 addition & 1 deletion src/structures/IntegrationApplication.js
Expand Up @@ -26,7 +26,7 @@ class IntegrationApplication extends Application {
* The url of the app's privacy policy
* @type {?string}
*/
this.privacyPolicyURL = data.privacyPolicyURL ?? this.data.privacyPolicyURL ?? null;
this.privacyPolicyURL = data.privacyPolicyURL ?? this.privacyPolicyURL ?? null;

/**
* The Array of RPC origin urls
Expand Down
4 changes: 3 additions & 1 deletion src/structures/Invite.js
Expand Up @@ -81,7 +81,9 @@ class Invite extends Base {
* The target application of this invite
* @type {?IntegrationApplication}
*/
this.targetApplication = data.target_application ? new IntegrationApplication(data.target_application) : null;
this.targetApplication = data.target_application
? new IntegrationApplication(this.client, data.target_application)
: null;

/**
* The type of the invite target:
Expand Down

0 comments on commit 4fa4136

Please sign in to comment.