magmastream 2.9.3-dev.9 → 2.10.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/dist/config/blockedWords.d.ts +1 -0
- package/dist/index.d.ts +19 -3700
- package/dist/index.js +1 -1
- package/dist/statestorage/JsonQueue.d.ts +173 -0
- package/dist/statestorage/JsonQueue.js +32 -4
- package/dist/statestorage/MemoryQueue.d.ts +154 -0
- package/dist/statestorage/MemoryQueue.js +56 -36
- package/dist/statestorage/RedisQueue.d.ts +178 -0
- package/dist/statestorage/RedisQueue.js +29 -7
- package/dist/structures/Enums.d.ts +310 -0
- package/dist/structures/Enums.js +4 -0
- package/dist/structures/Filters.d.ts +352 -0
- package/dist/structures/Filters.js +5 -4
- package/dist/structures/MagmastreamError.d.ts +14 -0
- package/dist/structures/Manager.d.ts +259 -0
- package/dist/structures/Manager.js +285 -542
- package/dist/structures/Node.d.ts +390 -0
- package/dist/structures/Node.js +100 -145
- package/dist/structures/Player.d.ts +347 -0
- package/dist/structures/Player.js +54 -128
- package/dist/structures/Plugin.d.ts +23 -0
- package/dist/structures/Rest.d.ts +93 -0
- package/dist/structures/Types.d.ts +1315 -0
- package/dist/structures/Utils.d.ts +169 -0
- package/dist/structures/Utils.js +107 -56
- package/dist/utils/filtersEqualizers.d.ts +16 -0
- package/dist/utils/managerCheck.d.ts +7 -0
- package/dist/utils/nodeCheck.d.ts +7 -0
- package/dist/utils/playerCheck.d.ts +7 -0
- package/dist/wrappers/discord.js.d.ts +15 -0
- package/dist/wrappers/discord.js.js +19 -4
- package/dist/wrappers/discordeno.d.ts +19 -0
- package/dist/wrappers/discordeno.js +77 -0
- package/dist/wrappers/eris.d.ts +15 -0
- package/dist/wrappers/eris.js +20 -3
- package/dist/wrappers/oceanic.d.ts +15 -0
- package/dist/wrappers/oceanic.js +22 -4
- package/dist/wrappers/seyfert.d.ts +37 -0
- package/dist/wrappers/seyfert.js +25 -1
- package/package.json +107 -102
- package/dist/wrappers/detritus.js +0 -52
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Node } from "./Node";
|
|
2
|
+
import { Manager } from "./Manager";
|
|
3
|
+
import { LavaPlayer, RestPlayOptions } from "./Types";
|
|
4
|
+
/** Handles the requests sent to the Lavalink REST API. */
|
|
5
|
+
export declare class Rest {
|
|
6
|
+
/** The Node that this Rest instance is connected to. */
|
|
7
|
+
private node;
|
|
8
|
+
/** The ID of the current session. */
|
|
9
|
+
private sessionId;
|
|
10
|
+
/** The password for the Node. */
|
|
11
|
+
private readonly password;
|
|
12
|
+
/** The URL of the Node. */
|
|
13
|
+
private readonly url;
|
|
14
|
+
/** The Manager instance. */
|
|
15
|
+
manager: Manager;
|
|
16
|
+
/** Whether the node is a NodeLink. */
|
|
17
|
+
isNodeLink: boolean;
|
|
18
|
+
constructor(node: Node, manager: Manager);
|
|
19
|
+
/**
|
|
20
|
+
* Sets the session ID.
|
|
21
|
+
* This method is used to set the session ID after a resume operation is done.
|
|
22
|
+
* @param {string} sessionId The session ID to set.
|
|
23
|
+
* @returns {string} Returns the set session ID.
|
|
24
|
+
*/
|
|
25
|
+
setSessionId(sessionId: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves one the player that is currently running on the node.
|
|
28
|
+
* @returns {Promise<unknown>} Returns the result of the GET request.
|
|
29
|
+
*/
|
|
30
|
+
getPlayer(guildId: string): Promise<LavaPlayer>;
|
|
31
|
+
/**
|
|
32
|
+
* Sends a PATCH request to update player related data.
|
|
33
|
+
* @param {RestPlayOptions} options The options to update the player with.
|
|
34
|
+
* @returns {Promise<unknown>} Returns the result of the PATCH request.
|
|
35
|
+
*/
|
|
36
|
+
updatePlayer(options: RestPlayOptions): Promise<unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Sends a DELETE request to the server to destroy the player.
|
|
39
|
+
* @param {string} guildId The guild ID of the player to destroy.
|
|
40
|
+
* @returns {Promise<unknown>} Returns the result of the DELETE request.
|
|
41
|
+
*/
|
|
42
|
+
destroyPlayer(guildId: string): Promise<unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Updates the session status for resuming.
|
|
45
|
+
* This method sends a PATCH request to update the session's resuming status and timeout.
|
|
46
|
+
*
|
|
47
|
+
* @param {boolean} resuming - Indicates whether the session should be set to resuming.
|
|
48
|
+
* @param {number} timeout - The timeout duration for the session resume.
|
|
49
|
+
* @returns {Promise<unknown>} The result of the PATCH request.
|
|
50
|
+
*/
|
|
51
|
+
updateSession(resuming: boolean, timeout: number): Promise<unknown>;
|
|
52
|
+
/**
|
|
53
|
+
* Sends a request to the specified endpoint and returns the response data.
|
|
54
|
+
* @param {string} method The HTTP method to use for the request.
|
|
55
|
+
* @param {string} endpoint The endpoint to send the request to.
|
|
56
|
+
* @param {unknown} [body] The data to send in the request body.
|
|
57
|
+
* @returns {Promise<unknown>} The response data of the request.
|
|
58
|
+
*/
|
|
59
|
+
private request;
|
|
60
|
+
/**
|
|
61
|
+
* Sends a GET request to the specified endpoint and returns the response data.
|
|
62
|
+
* @param {string} endpoint The endpoint to send the GET request to.
|
|
63
|
+
* @returns {Promise<unknown>} The response data of the GET request.
|
|
64
|
+
*/
|
|
65
|
+
get(endpoint: string): Promise<unknown>;
|
|
66
|
+
/**
|
|
67
|
+
* Sends a PATCH request to the specified endpoint and returns the response data.
|
|
68
|
+
* @param {string} endpoint The endpoint to send the PATCH request to.
|
|
69
|
+
* @param {unknown} body The data to send in the request body.
|
|
70
|
+
* @returns {Promise<unknown>} The response data of the PATCH request.
|
|
71
|
+
*/
|
|
72
|
+
patch(endpoint: string, body: unknown): Promise<unknown>;
|
|
73
|
+
/**
|
|
74
|
+
* Sends a POST request to the specified endpoint and returns the response data.
|
|
75
|
+
* @param {string} endpoint The endpoint to send the POST request to.
|
|
76
|
+
* @param {unknown} body The data to send in the request body.
|
|
77
|
+
* @returns {Promise<unknown>} The response data of the POST request.
|
|
78
|
+
*/
|
|
79
|
+
post(endpoint: string, body: unknown): Promise<unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* Sends a PUT request to the specified endpoint and returns the response data.
|
|
82
|
+
* @param {string} endpoint The endpoint to send the PUT request to.
|
|
83
|
+
* @param {unknown} body The data to send in the request body.
|
|
84
|
+
* @returns {Promise<unknown>} The response data of the PUT request.
|
|
85
|
+
*/
|
|
86
|
+
put(endpoint: string, body: unknown): Promise<unknown>;
|
|
87
|
+
/**
|
|
88
|
+
* Sends a DELETE request to the specified endpoint.
|
|
89
|
+
* @param {string} endpoint - The endpoint to send the DELETE request to.
|
|
90
|
+
* @returns {Promise<unknown>} The response data of the DELETE request.
|
|
91
|
+
*/
|
|
92
|
+
delete(endpoint: string): Promise<unknown>;
|
|
93
|
+
}
|