for-modules 1.1.5 → 1.1.6
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/LICENSE +21 -0
- package/NOTICE.txt +12 -0
- package/README.md +1 -7
- package/TikTok.txt +13 -0
- package/babel.config.json +6 -0
- package/bun.lock +686 -0
- package/dist/Structures/Manager.js +22 -36
- package/dist/Structures/Node.js +1 -1
- package/dist/Structures/Player.js +1 -1
- package/dist/Structures/Rest.js +1 -1
- package/dist/Structures/Utils.js +1 -1
- package/dist/index.js +1 -12
- package/eslint.config.d.ts +2 -0
- package/eslint.config.js +12 -0
- package/ff.txt +3037 -0
- package/package.json +52 -23
- package/renovate.json +6 -0
- package/tsconfig.json +24 -0
- package/dist/Structures/Filters.d.ts +0 -109
- package/dist/Structures/Manager.d.ts +0 -192
- package/dist/Structures/Node.d.ts +0 -140
- package/dist/Structures/Player.d.ts +0 -250
- package/dist/Structures/Queue.d.ts +0 -38
- package/dist/Structures/Rest.d.ts +0 -60
- package/dist/Structures/TikTok.d.ts +0 -18
- package/dist/Structures/TikTok.js +0 -118
- package/dist/Structures/Utils.d.ts +0 -174
- package/dist/Utils/FiltersEqualizers.d.ts +0 -12
- package/dist/Utils/ManagerCheck.d.ts +0 -2
- package/dist/Utils/NodeCheck.d.ts +0 -2
- package/dist/Utils/PlayerCheck.d.ts +0 -2
- package/dist/index.d.ts +0 -12
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { ClientUser, User } from "discord.js";
|
|
2
|
-
import { Manager } from "./Manager";
|
|
3
|
-
import { Node, NodeStats } from "./Node";
|
|
4
|
-
import { Player, Track, UnresolvedTrack } from "./Player";
|
|
5
|
-
import { Queue } from "./Queue";
|
|
6
|
-
export declare abstract class TrackUtils {
|
|
7
|
-
static trackPartial: string[] | null;
|
|
8
|
-
private static manager;
|
|
9
|
-
/** @hidden */
|
|
10
|
-
static init(manager: Manager): void;
|
|
11
|
-
static setTrackPartial(partial: string[]): void;
|
|
12
|
-
/**
|
|
13
|
-
* Checks if the provided argument is a valid Track or UnresolvedTrack, if provided an array then every element will be checked.
|
|
14
|
-
* @param trackOrTracks
|
|
15
|
-
*/
|
|
16
|
-
static validate(trackOrTracks: unknown): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Checks if the provided argument is a valid UnresolvedTrack.
|
|
19
|
-
* @param track
|
|
20
|
-
*/
|
|
21
|
-
static isUnresolvedTrack(track: unknown): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Checks if the provided argument is a valid Track.
|
|
24
|
-
* @param track
|
|
25
|
-
*/
|
|
26
|
-
static isTrack(track: unknown): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Builds a Track from the raw data from Lavalink and a optional requester.
|
|
29
|
-
* @param data
|
|
30
|
-
* @param requester
|
|
31
|
-
*/
|
|
32
|
-
static build(data: TrackData, requester?: User | ClientUser): Track;
|
|
33
|
-
/**
|
|
34
|
-
* Builds a UnresolvedTrack to be resolved before being played .
|
|
35
|
-
* @param query
|
|
36
|
-
* @param requester
|
|
37
|
-
*/
|
|
38
|
-
static buildUnresolved(query: string | UnresolvedQuery, requester?: User | ClientUser): UnresolvedTrack;
|
|
39
|
-
static getClosestTrack(unresolvedTrack: UnresolvedTrack): Promise<Track>;
|
|
40
|
-
}
|
|
41
|
-
/** Gets or extends structures to extend the built in, or already extended, classes to add more functionality. */
|
|
42
|
-
export declare abstract class Structure {
|
|
43
|
-
/**
|
|
44
|
-
* Extends a class.
|
|
45
|
-
* @param name
|
|
46
|
-
* @param extender
|
|
47
|
-
*/
|
|
48
|
-
static extend<K extends keyof Extendable, T extends Extendable[K]>(name: K, extender: (target: Extendable[K]) => T): T;
|
|
49
|
-
/**
|
|
50
|
-
* Get a structure from available structures by name.
|
|
51
|
-
* @param name
|
|
52
|
-
*/
|
|
53
|
-
static get<K extends keyof Extendable>(name: K): Extendable[K];
|
|
54
|
-
}
|
|
55
|
-
export declare class Plugin {
|
|
56
|
-
load(manager: Manager): void;
|
|
57
|
-
unload(manager: Manager): void;
|
|
58
|
-
}
|
|
59
|
-
export interface UnresolvedQuery {
|
|
60
|
-
/** The title of the unresolved track. */
|
|
61
|
-
title: string;
|
|
62
|
-
/** The author of the unresolved track. If provided it will have a more precise search. */
|
|
63
|
-
author?: string;
|
|
64
|
-
/** The duration of the unresolved track. If provided it will have a more precise search. */
|
|
65
|
-
duration?: number;
|
|
66
|
-
}
|
|
67
|
-
export type Sizes = "0" | "1" | "2" | "3" | "default" | "mqdefault" | "hqdefault" | "maxresdefault";
|
|
68
|
-
export type LoadType = "track" | "playlist" | "search" | "empty" | "error";
|
|
69
|
-
export type State = "CONNECTED" | "CONNECTING" | "DISCONNECTED" | "DISCONNECTING" | "DESTROYING" | "MOVING";
|
|
70
|
-
export type PlayerEvents = TrackStartEvent | TrackEndEvent | TrackStuckEvent | TrackExceptionEvent | WebSocketClosedEvent;
|
|
71
|
-
export type PlayerEventType = "TrackStartEvent" | "TrackEndEvent" | "TrackExceptionEvent" | "TrackStuckEvent" | "WebSocketClosedEvent";
|
|
72
|
-
export type TrackEndReason = "finished" | "loadFailed" | "stopped" | "replaced" | "cleanup";
|
|
73
|
-
export type Severity = "common" | "suspicious" | "fault";
|
|
74
|
-
export interface TrackData {
|
|
75
|
-
/** The track information. */
|
|
76
|
-
encoded: string;
|
|
77
|
-
/** The detailed information of the track. */
|
|
78
|
-
info: TrackDataInfo;
|
|
79
|
-
/** Additional track info provided by plugins. */
|
|
80
|
-
pluginInfo: Record<string, string>;
|
|
81
|
-
}
|
|
82
|
-
export interface TrackDataInfo {
|
|
83
|
-
identifier: string;
|
|
84
|
-
isSeekable: boolean;
|
|
85
|
-
author: string;
|
|
86
|
-
length: number;
|
|
87
|
-
isrc?: string;
|
|
88
|
-
isStream: boolean;
|
|
89
|
-
title: string;
|
|
90
|
-
uri?: string;
|
|
91
|
-
artworkUrl?: string;
|
|
92
|
-
sourceName?: TrackSourceName;
|
|
93
|
-
}
|
|
94
|
-
export type TrackSourceName = "deezer" | "spotify" | "soundcloud" | "youtube" | "tiktok";
|
|
95
|
-
export interface Extendable {
|
|
96
|
-
Player: typeof Player;
|
|
97
|
-
Queue: typeof Queue;
|
|
98
|
-
Node: typeof Node;
|
|
99
|
-
}
|
|
100
|
-
export interface VoiceState {
|
|
101
|
-
op: "voiceUpdate";
|
|
102
|
-
guildId: string;
|
|
103
|
-
event: VoiceServer;
|
|
104
|
-
sessionId?: string;
|
|
105
|
-
}
|
|
106
|
-
export interface VoiceServer {
|
|
107
|
-
token: string;
|
|
108
|
-
guild_id: string;
|
|
109
|
-
endpoint: string;
|
|
110
|
-
}
|
|
111
|
-
export interface VoiceState {
|
|
112
|
-
guild_id: string;
|
|
113
|
-
user_id: string;
|
|
114
|
-
session_id: string;
|
|
115
|
-
channel_id: string;
|
|
116
|
-
}
|
|
117
|
-
export interface VoicePacket {
|
|
118
|
-
t?: "VOICE_SERVER_UPDATE" | "VOICE_STATE_UPDATE";
|
|
119
|
-
d: VoiceState | VoiceServer;
|
|
120
|
-
}
|
|
121
|
-
export interface NodeMessage extends NodeStats {
|
|
122
|
-
type: PlayerEventType;
|
|
123
|
-
op: "stats" | "playerUpdate" | "event";
|
|
124
|
-
guildId: string;
|
|
125
|
-
}
|
|
126
|
-
export interface PlayerEvent {
|
|
127
|
-
op: "event";
|
|
128
|
-
type: PlayerEventType;
|
|
129
|
-
guildId: string;
|
|
130
|
-
}
|
|
131
|
-
export interface Exception {
|
|
132
|
-
message: string;
|
|
133
|
-
severity: Severity;
|
|
134
|
-
cause: string;
|
|
135
|
-
}
|
|
136
|
-
export interface TrackStartEvent extends PlayerEvent {
|
|
137
|
-
type: "TrackStartEvent";
|
|
138
|
-
track: TrackData;
|
|
139
|
-
}
|
|
140
|
-
export interface TrackEndEvent extends PlayerEvent {
|
|
141
|
-
type: "TrackEndEvent";
|
|
142
|
-
track: TrackData;
|
|
143
|
-
reason: TrackEndReason;
|
|
144
|
-
}
|
|
145
|
-
export interface TrackExceptionEvent extends PlayerEvent {
|
|
146
|
-
exception?: Exception;
|
|
147
|
-
guildId: string;
|
|
148
|
-
type: "TrackExceptionEvent";
|
|
149
|
-
}
|
|
150
|
-
export interface TrackStuckEvent extends PlayerEvent {
|
|
151
|
-
type: "TrackStuckEvent";
|
|
152
|
-
thresholdMs: number;
|
|
153
|
-
}
|
|
154
|
-
export interface WebSocketClosedEvent extends PlayerEvent {
|
|
155
|
-
type: "WebSocketClosedEvent";
|
|
156
|
-
code: number;
|
|
157
|
-
reason: string;
|
|
158
|
-
byRemote: boolean;
|
|
159
|
-
}
|
|
160
|
-
export interface PlayerUpdate {
|
|
161
|
-
op: "playerUpdate";
|
|
162
|
-
/** The guild id of the player. */
|
|
163
|
-
guildId: string;
|
|
164
|
-
state: {
|
|
165
|
-
/** Unix timestamp in milliseconds. */
|
|
166
|
-
time: number;
|
|
167
|
-
/** The position of the track in milliseconds. */
|
|
168
|
-
position: number;
|
|
169
|
-
/** Whether Lavalink is connected to the voice gateway. */
|
|
170
|
-
connected: boolean;
|
|
171
|
-
/** The ping of the node to the Discord voice server in milliseconds (-1 if not connected). */
|
|
172
|
-
ping: number;
|
|
173
|
-
};
|
|
174
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Represents an equalizer band. */
|
|
2
|
-
export interface Band {
|
|
3
|
-
/** The index of the equalizer band. */
|
|
4
|
-
band: number;
|
|
5
|
-
/** The gain value of the equalizer band. */
|
|
6
|
-
gain: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const bassBoostEqualizer: Band[];
|
|
9
|
-
export declare const softEqualizer: Band[];
|
|
10
|
-
export declare const tvEqualizer: Band[];
|
|
11
|
-
export declare const trebleBassEqualizer: Band[];
|
|
12
|
-
export declare const vaporwaveEqualizer: Band[];
|
package/dist/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./Structures/Manager";
|
|
2
|
-
export * from "./Structures/Node";
|
|
3
|
-
export * from "./Structures/Player";
|
|
4
|
-
export * from "./Structures/Queue";
|
|
5
|
-
export * from "./Structures/Utils";
|
|
6
|
-
export * from "./Structures/Filters";
|
|
7
|
-
export * from "./Structures/Rest";
|
|
8
|
-
export * from "./Utils/FiltersEqualizers";
|
|
9
|
-
export * from "./Utils/ManagerCheck";
|
|
10
|
-
export * from "./Utils/NodeCheck";
|
|
11
|
-
export * from "./Utils/PlayerCheck";
|
|
12
|
-
export * from "./Structures/TikTok";
|