feat(Application): add terms of service, privacy policy URLs, and verification key

This commit is contained in:
Elysia
2025-02-14 23:51:55 +07:00
parent c1c0a62a0e
commit c24584f408
2 changed files with 33 additions and 0 deletions

View File

@@ -61,6 +61,36 @@ class Application extends Base {
this.icon ??= null;
}
if ('terms_of_service_url' in data) {
/**
* The URL of the application's terms of service
* @type {?string}
*/
this.termsOfServiceURL = data.terms_of_service_url;
} else {
this.termsOfServiceURL ??= null;
}
if ('privacy_policy_url' in data) {
/**
* The URL of the application's privacy policy
* @type {?string}
*/
this.privacyPolicyURL = data.privacy_policy_url;
} else {
this.privacyPolicyURL ??= null;
}
if ('verify_key' in data) {
/**
* The hex-encoded key for verification in interactions and the GameSDK's GetTicket
* @type {?string}
*/
this.verifyKey = data.verify_key;
} else {
this.verifyKey ??= null;
}
if ('role_connections_verification_url' in data) {
/**
* This application's role connection verification entry point URL

3
typings/index.d.ts vendored
View File

@@ -338,6 +338,9 @@ export abstract class Application extends Base {
public icon: string | null;
public id: Snowflake;
public name: string | null;
public termsOfServiceURL: string | null;
public privacyPolicyURL: string | null;
public verifyKey: string | null;
public roleConnectionsVerificationURL: string | null;
public approximateGuildCount: number | null;
public botPublic: boolean | null;