-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
IntegrationApplication.js
65 lines (53 loc) · 1.48 KB
/
IntegrationApplication.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'use strict';
const Application = require('./interfaces/Application');
/**
* Represents an Integration's OAuth2 Application.
* @extends {Application}
*/
class IntegrationApplication extends Application {
_patch(data) {
super._patch(data);
/**
* The bot user for this application
* @type {?User}
*/
this.bot = data.bot ? this.client.users.add(data.bot) : this.bot ?? null;
/**
* The url of the app's terms of service
* @type {?string}
*/
this.termsOfServiceURL = data.terms_of_service_url ?? this.terms_of_service_url ?? null;
/**
* The url of the app's privacy policy
* @type {?string}
*/
this.privacyPolicyURL = data.privacyPolicyURL ?? this.privacyPolicyURL ?? null;
/**
* The Array of RPC origin urls
* @type {string[]}
*/
this.rpcOrigins = data.rpc_origins ?? data.rpc_origins ?? [];
/**
* The application summary
* @type {?string}
*/
this.summary = data.summary ?? this.summary ?? null;
// TODO: What does #hook indicate?
/**
* Unknown
* @type {?boolean}
*/
this.hook = data.hook ?? this.hook ?? null;
/**
* The hash of the application's cover image
* @type {?string}
*/
this.cover = data.cover_image ?? this.cover ?? null;
/**
* The verification key of the application
* @type {?string}
*/
this.verifyKey = data.verify_key ?? this.verifyKey ?? null;
}
}
module.exports = IntegrationApplication;