erlc-api 2.3.4 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +2 -2
- package/README.md +428 -110
- package/package.json +36 -34
- package/src/classes/client.js +35 -35
- package/src/constants.js +1 -1
- package/src/erlc.js +15 -14
- package/src/functions/assert.js +4 -4
- package/src/functions/server/getBans.js +54 -28
- package/src/functions/server/getCommandLogs.js +54 -28
- package/src/functions/server/getJoinLogs.js +54 -28
- package/src/functions/server/getKillLogs.js +54 -28
- package/src/functions/server/getModcallLogs.js +54 -28
- package/src/functions/server/getPlayers.js +54 -28
- package/src/functions/server/getQueue.js +54 -28
- package/src/functions/server/getServer.js +77 -51
- package/src/functions/server/getStaff.js +54 -0
- package/src/functions/server/getVehicles.js +54 -28
- package/src/functions/server/runCommand.js +70 -29
- package/src/types/custom.d.ts +4 -4
- package/src/types/index.d.ts +98 -91
|
@@ -1,52 +1,78 @@
|
|
|
1
|
-
const { BASEURL
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
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
|
-
|
|
1
|
+
const { BASEURL, Vanity } = require("../../constants.js");
|
|
2
|
+
|
|
3
|
+
module.exports = (serverToken) => {
|
|
4
|
+
return new Promise(async (resolve, reject) => {
|
|
5
|
+
try {
|
|
6
|
+
const fetch = await import("node-fetch");
|
|
7
|
+
const { config } = await import("../../erlc.js");
|
|
8
|
+
|
|
9
|
+
const res = await fetch.default(`${BASEURL}/server`, {
|
|
10
|
+
headers: {
|
|
11
|
+
"Authorization": config?.globalToken,
|
|
12
|
+
"Server-Key": serverToken,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const data = await res.json().catch((err) => {
|
|
17
|
+
return reject(err);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
if (!res.ok) {
|
|
21
|
+
return reject(data);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const getUsername = async (userId) => {
|
|
25
|
+
try {
|
|
26
|
+
const response = await fetch.default(`https://users.roblox.com/v1/users/${userId}`);
|
|
27
|
+
const userData = await response.json();
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
console.warn(`Warning: Could not fetch username for ID: ${userId}`);
|
|
30
|
+
return `User:${userId}`; // Fallback format
|
|
31
|
+
}
|
|
32
|
+
return userData.name;
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.warn(`Warning: Error fetching username for ID: ${userId}`, error);
|
|
35
|
+
return `User:${userId}`; // Fallback format
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
// Get owner username
|
|
41
|
+
const ownerUsername = await getUsername(data.OwnerId);
|
|
42
|
+
|
|
43
|
+
// Get co-owner usernames (handle empty array case)
|
|
44
|
+
const coOwnerUsernames = data.CoOwnerIds && data.CoOwnerIds.length > 0
|
|
45
|
+
? await Promise.all(data.CoOwnerIds.map(getUsername))
|
|
46
|
+
: [];
|
|
47
|
+
|
|
48
|
+
// Create vanity URL
|
|
49
|
+
const vanityURL = `${Vanity}${data.JoinKey}`;
|
|
50
|
+
|
|
51
|
+
// Add the new properties to the response
|
|
52
|
+
const enhancedData = {
|
|
53
|
+
...data,
|
|
54
|
+
OwnerUsername: ownerUsername,
|
|
55
|
+
CoOwnerUsernames: coOwnerUsernames,
|
|
56
|
+
VanityURL: vanityURL
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// Remove the original ID properties as they're now converted to usernames
|
|
60
|
+
delete enhancedData.OwnerId;
|
|
61
|
+
delete enhancedData.CoOwnerIds;
|
|
62
|
+
|
|
63
|
+
resolve(enhancedData);
|
|
64
|
+
} catch (error) {
|
|
65
|
+
// If username fetching fails, still return the original data with IDs
|
|
66
|
+
console.warn('Warning: Could not fetch usernames, returning data with IDs:', error);
|
|
67
|
+
const fallbackData = {
|
|
68
|
+
...data,
|
|
69
|
+
VanityURL: `${Vanity}${data.JoinKey}`
|
|
70
|
+
};
|
|
71
|
+
resolve(fallbackData);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
} catch (error) {
|
|
75
|
+
reject(error);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
52
78
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const { BASEURL } = require("../../constants.js");
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves server staff information
|
|
5
|
+
* @param {string} serverToken - The server API key
|
|
6
|
+
* @returns {Promise<Object>} Promise that resolves to server staff object
|
|
7
|
+
*/
|
|
8
|
+
module.exports = (serverToken) => {
|
|
9
|
+
return new Promise(async (resolve, reject) => {
|
|
10
|
+
// Input validation
|
|
11
|
+
if (!serverToken || typeof serverToken !== 'string') {
|
|
12
|
+
return reject(new Error('Server token is required and must be a string'));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
const fetch = await import("node-fetch");
|
|
17
|
+
const { config } = await import("../../erlc.js");
|
|
18
|
+
|
|
19
|
+
// Check if global token is configured
|
|
20
|
+
if (!config?.globalToken) {
|
|
21
|
+
return reject(new Error('Global token not configured. Please initialize the client first.'));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const res = await fetch.default(`${BASEURL}/server/staff`, {
|
|
25
|
+
headers: {
|
|
26
|
+
"Authorization": config.globalToken,
|
|
27
|
+
"Server-Key": serverToken,
|
|
28
|
+
},
|
|
29
|
+
timeout: 10000, // 10 second timeout
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (!res.ok) {
|
|
33
|
+
const errorData = await res.json().catch(() => ({ error: 'Unknown API error' }));
|
|
34
|
+
const error = new Error(`API Error: ${res.status} - ${errorData.error || res.statusText}`);
|
|
35
|
+
error.status = res.status;
|
|
36
|
+
error.data = errorData;
|
|
37
|
+
return reject(error);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const data = await res.json();
|
|
41
|
+
resolve(data || { CoOwners: [], Admins: {}, Mods: {} });
|
|
42
|
+
|
|
43
|
+
} catch (error) {
|
|
44
|
+
// Handle different types of errors
|
|
45
|
+
if (error.code === 'ENOTFOUND') {
|
|
46
|
+
reject(new Error('Network error: Unable to connect to ER:LC API'));
|
|
47
|
+
} else if (error.name === 'AbortError') {
|
|
48
|
+
reject(new Error('Request timeout: API took too long to respond'));
|
|
49
|
+
} else {
|
|
50
|
+
reject(error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
};
|
|
@@ -1,28 +1,54 @@
|
|
|
1
|
-
const { BASEURL } = require("../../constants.js");
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
if
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
1
|
+
const { BASEURL } = require("../../constants.js");
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves server vehicles information
|
|
5
|
+
* @param {string} serverToken - The server API key
|
|
6
|
+
* @returns {Promise<Array>} Promise that resolves to array of vehicles
|
|
7
|
+
*/
|
|
8
|
+
module.exports = (serverToken) => {
|
|
9
|
+
return new Promise(async (resolve, reject) => {
|
|
10
|
+
// Input validation
|
|
11
|
+
if (!serverToken || typeof serverToken !== 'string') {
|
|
12
|
+
return reject(new Error('Server token is required and must be a string'));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
const fetch = await import("node-fetch");
|
|
17
|
+
const { config } = await import("../../erlc.js");
|
|
18
|
+
|
|
19
|
+
// Check if global token is configured
|
|
20
|
+
if (!config?.globalToken) {
|
|
21
|
+
return reject(new Error('Global token not configured. Please initialize the client first.'));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const res = await fetch.default(`${BASEURL}/server/vehicles`, {
|
|
25
|
+
headers: {
|
|
26
|
+
"Authorization": config.globalToken,
|
|
27
|
+
"Server-Key": serverToken,
|
|
28
|
+
},
|
|
29
|
+
timeout: 10000, // 10 second timeout
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (!res.ok) {
|
|
33
|
+
const errorData = await res.json().catch(() => ({ error: 'Unknown API error' }));
|
|
34
|
+
const error = new Error(`API Error: ${res.status} - ${errorData.error || res.statusText}`);
|
|
35
|
+
error.status = res.status;
|
|
36
|
+
error.data = errorData;
|
|
37
|
+
return reject(error);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const data = await res.json();
|
|
41
|
+
resolve(Array.isArray(data) ? data : []);
|
|
42
|
+
|
|
43
|
+
} catch (error) {
|
|
44
|
+
// Handle different types of errors
|
|
45
|
+
if (error.code === 'ENOTFOUND') {
|
|
46
|
+
reject(new Error('Network error: Unable to connect to ER:LC API'));
|
|
47
|
+
} else if (error.name === 'AbortError') {
|
|
48
|
+
reject(new Error('Request timeout: API took too long to respond'));
|
|
49
|
+
} else {
|
|
50
|
+
reject(error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
};
|
|
@@ -1,29 +1,70 @@
|
|
|
1
|
-
const { BASEURL } = require("../../constants.js");
|
|
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
|
-
|
|
1
|
+
const { BASEURL } = require("../../constants.js");
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Executes a command on the server
|
|
5
|
+
* @param {string} serverToken - The server API key
|
|
6
|
+
* @param {string} command - The command to execute
|
|
7
|
+
* @returns {Promise<boolean>} Promise that resolves to true if command was executed successfully
|
|
8
|
+
*/
|
|
9
|
+
module.exports = (serverToken, command) => {
|
|
10
|
+
return new Promise(async (resolve, reject) => {
|
|
11
|
+
// Input validation
|
|
12
|
+
if (!serverToken || typeof serverToken !== 'string') {
|
|
13
|
+
return reject(new Error('Server token is required and must be a string'));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (!command || typeof command !== 'string') {
|
|
17
|
+
return reject(new Error('Command is required and must be a string'));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (command.trim().length === 0) {
|
|
21
|
+
return reject(new Error('Command cannot be empty'));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
const fetch = await import("node-fetch");
|
|
26
|
+
const { config } = await import("../../erlc.js");
|
|
27
|
+
|
|
28
|
+
// Check if global token is configured
|
|
29
|
+
if (!config?.globalToken) {
|
|
30
|
+
return reject(new Error('Global token not configured. Please initialize the client first.'));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const requestBody = JSON.stringify({ command: command.trim() });
|
|
34
|
+
|
|
35
|
+
const res = await fetch.default(`${BASEURL}/server/command`, {
|
|
36
|
+
method: "POST",
|
|
37
|
+
headers: {
|
|
38
|
+
"Authorization": config.globalToken,
|
|
39
|
+
"Server-Key": serverToken,
|
|
40
|
+
"Content-Type": "application/json",
|
|
41
|
+
},
|
|
42
|
+
body: requestBody,
|
|
43
|
+
timeout: 15000, // 15 second timeout for commands
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (!res.ok) {
|
|
47
|
+
const errorData = await res.json().catch(() => ({ error: 'Unknown API error' }));
|
|
48
|
+
const error = new Error(`Command execution failed: ${res.status} - ${errorData.error || res.statusText}`);
|
|
49
|
+
error.status = res.status;
|
|
50
|
+
error.data = errorData;
|
|
51
|
+
return reject(error);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Command executed successfully
|
|
55
|
+
resolve(true);
|
|
56
|
+
|
|
57
|
+
} catch (error) {
|
|
58
|
+
// Handle different types of errors
|
|
59
|
+
if (error.code === 'ENOTFOUND') {
|
|
60
|
+
reject(new Error('Network error: Unable to connect to ER:LC API'));
|
|
61
|
+
} else if (error.name === 'AbortError') {
|
|
62
|
+
reject(new Error('Request timeout: Command took too long to execute'));
|
|
63
|
+
} else if (error.message.includes('JSON')) {
|
|
64
|
+
reject(new Error('Invalid command format'));
|
|
65
|
+
} else {
|
|
66
|
+
reject(error);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
};
|
package/src/types/custom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare module 'NodeModule' {
|
|
2
|
-
interface NodeModule {
|
|
3
|
-
type?: string;
|
|
4
|
-
}
|
|
1
|
+
declare module 'NodeModule' {
|
|
2
|
+
interface NodeModule {
|
|
3
|
+
type?: string;
|
|
4
|
+
}
|
|
5
5
|
}
|
package/src/types/index.d.ts
CHANGED
|
@@ -1,91 +1,98 @@
|
|
|
1
|
-
declare module "erlc-api" {
|
|
2
|
-
export interface ClientConfig {
|
|
3
|
-
globalToken: string; // The ER:LC global API token
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const BASEURL = "https://api.policeroleplay.community/v1";
|
|
7
|
-
|
|
8
|
-
type PlayerId = string;
|
|
9
|
-
type PlayerName = string;
|
|
10
|
-
type TextureName = string;
|
|
11
|
-
type CarName = string;
|
|
12
|
-
|
|
13
|
-
export type ErlcPlayer = `${PlayerName}:${PlayerId}`; // Playername:UserID
|
|
14
|
-
export type ErlcPlayerPermission =
|
|
15
|
-
| "Normal"
|
|
16
|
-
| "Server Administrator"
|
|
17
|
-
| "Server Owner"
|
|
18
|
-
| "Server Moderator";
|
|
19
|
-
|
|
20
|
-
export interface ServerStatus {
|
|
21
|
-
Name: string; // The server name
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
CurrentPlayers: number; // The amount of people currently in-game
|
|
25
|
-
MaxPlayers: number; // The amount of people who can join the server including server owner
|
|
26
|
-
JoinKey: string; // The code used to join the private server
|
|
27
|
-
AccVerifiedReq: "Disabled" | "Email" | "Phone/ID"; // The level of verification roblox accounts need to join the private server
|
|
28
|
-
TeamBalance: boolean; // If team balance is enabled or not
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
export
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
export function
|
|
80
|
-
export function
|
|
81
|
-
export function
|
|
82
|
-
export function
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
): Promise<
|
|
86
|
-
|
|
87
|
-
export
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
1
|
+
declare module "erlc-api" {
|
|
2
|
+
export interface ClientConfig {
|
|
3
|
+
globalToken: string; // The ER:LC global API token
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const BASEURL = "https://api.policeroleplay.community/v1";
|
|
7
|
+
|
|
8
|
+
type PlayerId = string;
|
|
9
|
+
type PlayerName = string;
|
|
10
|
+
type TextureName = string;
|
|
11
|
+
type CarName = string;
|
|
12
|
+
|
|
13
|
+
export type ErlcPlayer = `${PlayerName}:${PlayerId}`; // Playername:UserID
|
|
14
|
+
export type ErlcPlayerPermission =
|
|
15
|
+
| "Normal"
|
|
16
|
+
| "Server Administrator"
|
|
17
|
+
| "Server Owner"
|
|
18
|
+
| "Server Moderator";
|
|
19
|
+
|
|
20
|
+
export interface ServerStatus {
|
|
21
|
+
Name: string; // The server name
|
|
22
|
+
OwnerUsername: string; // The username of the server owner
|
|
23
|
+
CoOwnerUsernames: string[]; // The usernames of the server co owners
|
|
24
|
+
CurrentPlayers: number; // The amount of people currently in-game
|
|
25
|
+
MaxPlayers: number; // The amount of people who can join the server including server owner
|
|
26
|
+
JoinKey: string; // The code used to join the private server
|
|
27
|
+
AccVerifiedReq: "Disabled" | "Email" | "Phone/ID"; // The level of verification roblox accounts need to join the private server
|
|
28
|
+
TeamBalance: boolean; // If team balance is enabled or not
|
|
29
|
+
VanityURL: string; // The vanity URL to join the server
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ServerPlayer {
|
|
33
|
+
Player: ErlcPlayer;
|
|
34
|
+
Permission: ErlcPlayerPermission;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface JoinLog {
|
|
38
|
+
Join: boolean; // True is join and False is leave
|
|
39
|
+
Timestamp: number; // Timestamp in seconds
|
|
40
|
+
Player: ErlcPlayer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface KillLog {
|
|
44
|
+
Killed: ErlcPlayer;
|
|
45
|
+
Timestamp: number; // Timestamp in seconds
|
|
46
|
+
Killer: ErlcPlayer;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface CommandLog {
|
|
50
|
+
Player: ErlcPlayer;
|
|
51
|
+
Timestamp: number; // Timestamp in seconds
|
|
52
|
+
Command: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ModcallLog {
|
|
56
|
+
Caller: ErlcPlayer;
|
|
57
|
+
Moderator?: ErlcPlayer; // If call is unanswered property is undefined
|
|
58
|
+
Timestamp: number; // Timestamp in seconds
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type ServerBan = Record<PlayerId, PlayerName>;
|
|
62
|
+
|
|
63
|
+
export interface VehiclesLog {
|
|
64
|
+
Texture: string | null;
|
|
65
|
+
Name: string;
|
|
66
|
+
Owner: ErlcPlayer;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface ServerStaff {
|
|
70
|
+
CoOwners: number[];
|
|
71
|
+
Admins: Record<string, string>;
|
|
72
|
+
Mods: Record<string, string>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface VSMCommandBody {
|
|
76
|
+
command: string; // ":h Hey everyone!"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function getBans(serverToken: string): Promise<ServerBan>;
|
|
80
|
+
export function getCommandLogs(serverToken: string): Promise<CommandLog[]>;
|
|
81
|
+
export function getJoinLogs(serverToken: string): Promise<JoinLog[]>;
|
|
82
|
+
export function getKillLogs(serverToken: string): Promise<KillLog[]>;
|
|
83
|
+
export function getModcallLogs(serverToken: string): Promise<ModcallLog[]>;
|
|
84
|
+
export function getPlayers(serverToken: string): Promise<ServerPlayer[]>;
|
|
85
|
+
export function getQueue(serverToken: string): Promise<number[]>;
|
|
86
|
+
export function getServer(serverToken: string): Promise<ServerStatus>;
|
|
87
|
+
export function getStaff(serverToken: string): Promise<ServerStaff>;
|
|
88
|
+
export function getVehicles(serverToken: string): Promise<VehiclesLog[]>;
|
|
89
|
+
export function runCommand(
|
|
90
|
+
serverToken: string,
|
|
91
|
+
command: string
|
|
92
|
+
): Promise<boolean>;
|
|
93
|
+
|
|
94
|
+
export class Client {
|
|
95
|
+
constructor(options: ClientConfig);
|
|
96
|
+
config(): ClientConfig;
|
|
97
|
+
}
|
|
98
|
+
}
|