-
Notifications
You must be signed in to change notification settings - Fork 5
/
types.js
39 lines (37 loc) · 888 Bytes
/
types.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
class Token {
/**
* @param {Number} id
* @param {'Root' | 'Admin' | 'User'} permission
* @param {String} token
* @param {Number} userid
* @param {Boolean} retired
*/
constructor(id, permission, token, userid, retired) {
this.id = id;
this.permission = permission;
this.token = token;
this.userid = userid;
this.retired = retired;
}
}
class Ban {
/**
* @param {Number} id
* @param {String} reason
* @param {Number} admin
* @param {Number} [date=0]
* @param {String} [message]
*/
constructor(id, reason, admin, date = 0, message) {
this.id = id;
this.reason = reason;
this.date = new Date(date * 1000);
this.timestamp = date;
this.admin = admin;
this.message = message;
}
}
module.exports = {
Token,
Ban,
};