discord-player 6.8.0-dev.0 → 7.0.0-dev.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/index.d.ts +174 -186
- package/dist/index.js +439 -443
- package/dist/index.mjs +4 -6
- package/package.json +9 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
|
-
import { Client, VoiceChannel, StageChannel,
|
|
2
|
+
import { Client, VoiceChannel, StageChannel, Guild, VoiceState, VoiceBasedChannel, GuildVoiceChannelResolvable, User, Snowflake, GuildResolvable, UserResolvable } from 'discord.js';
|
|
3
3
|
import Eris from 'eris';
|
|
4
4
|
import { ListenerSignature, DefaultListener, EventEmitter, Queue, QueueStrategy, Collection } from '@discord-player/utils';
|
|
5
5
|
import * as _discord_player_equalizer from '@discord-player/equalizer';
|
|
6
6
|
import { EqualizerBand, BiquadFilters, PCMFilters, FiltersChain } from '@discord-player/equalizer';
|
|
7
7
|
export { AF_NIGHTCORE_RATE, AF_VAPORWAVE_RATE, BASS_EQ_BANDS, FilterType as BiquadFilterType, BiquadFilters, FiltersChain, AudioFilters as PCMAudioFilters, PCMFilters, Q_BUTTERWORTH, VolumeTransformer } from '@discord-player/equalizer';
|
|
8
|
-
import { Readable as Readable$1 } from 'node:stream';
|
|
9
|
-
import { StreamType, AudioPlayerError, AudioResource, VoiceConnection, AudioPlayer, AudioPlayerStatus, EndBehaviorType } from 'discord-voip';
|
|
10
|
-
export { AudioPlayer, CreateAudioPlayerOptions, createAudioPlayer, getVoiceConnection, getVoiceConnections } from 'discord-voip';
|
|
11
8
|
import * as stream from 'stream';
|
|
12
9
|
import { Readable, Duplex } from 'stream';
|
|
13
10
|
import * as _discord_player_extractor from '@discord-player/extractor';
|
|
14
11
|
import { BridgeProvider } from '@discord-player/extractor';
|
|
15
12
|
import { RequestOptions } from 'http';
|
|
13
|
+
import { StreamType, AudioPlayerError, AudioResource, VoiceConnection, AudioPlayer, AudioPlayerStatus } from 'discord-voip';
|
|
14
|
+
export { AudioPlayer, CreateAudioPlayerOptions, JoinConfig, JoinVoiceChannelOptions, createAudioPlayer, getVoiceConnection, getVoiceConnections, joinVoiceChannel } from 'discord-voip';
|
|
16
15
|
import * as _discord_player_ffmpeg from '@discord-player/ffmpeg';
|
|
17
16
|
import { FFmpeg } from '@discord-player/ffmpeg';
|
|
18
17
|
export * from '@discord-player/ffmpeg';
|
|
@@ -72,7 +71,6 @@ declare class StreamDispatcher extends EventEmitter<VoiceEvents> {
|
|
|
72
71
|
readonly connectionTimeout: number;
|
|
73
72
|
voiceConnection: VoiceConnection;
|
|
74
73
|
audioPlayer: AudioPlayer;
|
|
75
|
-
receiver: VoiceReceiverNode;
|
|
76
74
|
channel: VoiceChannel | StageChannel;
|
|
77
75
|
audioResource?: AudioResource<Track> | null;
|
|
78
76
|
dsp: FiltersChain;
|
|
@@ -190,30 +188,6 @@ declare class StreamDispatcher extends EventEmitter<VoiceEvents> {
|
|
|
190
188
|
get streamTime(): number;
|
|
191
189
|
}
|
|
192
190
|
|
|
193
|
-
interface VoiceReceiverOptions {
|
|
194
|
-
mode?: 'opus' | 'pcm';
|
|
195
|
-
end?: EndBehaviorType;
|
|
196
|
-
silenceDuration?: number;
|
|
197
|
-
crc?: boolean;
|
|
198
|
-
}
|
|
199
|
-
type RawTrackInit = Partial<Omit<RawTrackData, 'author' | 'playlist' | 'source' | 'engine' | 'raw' | 'queryType' | 'description' | 'views'>>;
|
|
200
|
-
declare class VoiceReceiverNode {
|
|
201
|
-
dispatcher: StreamDispatcher;
|
|
202
|
-
constructor(dispatcher: StreamDispatcher);
|
|
203
|
-
createRawTrack(stream: Readable$1, data?: RawTrackInit): Track<unknown>;
|
|
204
|
-
/**
|
|
205
|
-
* Merge multiple streams together
|
|
206
|
-
* @param streams The array of streams to merge
|
|
207
|
-
*/
|
|
208
|
-
mergeRecordings(streams: Readable$1[]): void;
|
|
209
|
-
/**
|
|
210
|
-
* Record a user in voice channel
|
|
211
|
-
* @param user The user to record
|
|
212
|
-
* @param options Recording options
|
|
213
|
-
*/
|
|
214
|
-
recordUser(user: UserResolvable, options?: VoiceReceiverOptions): Readable$1;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
191
|
declare class GuildQueueHistory<Meta = unknown> {
|
|
218
192
|
queue: GuildQueue<Meta>;
|
|
219
193
|
tracks: Queue<Track<unknown>>;
|
|
@@ -963,6 +937,7 @@ interface GuildNodeInit<Meta = unknown> {
|
|
|
963
937
|
disableFilterer: boolean;
|
|
964
938
|
disableBiquad: boolean;
|
|
965
939
|
disableResampler: boolean;
|
|
940
|
+
disableFallbackStream: boolean;
|
|
966
941
|
}
|
|
967
942
|
interface VoiceConnectConfig {
|
|
968
943
|
deaf?: boolean;
|
|
@@ -1338,10 +1313,6 @@ declare class GuildQueue<Meta = unknown> {
|
|
|
1338
1313
|
* Formatted duration of this queue
|
|
1339
1314
|
*/
|
|
1340
1315
|
get durationFormatted(): string;
|
|
1341
|
-
/**
|
|
1342
|
-
* The voice receiver for this queue
|
|
1343
|
-
*/
|
|
1344
|
-
get voiceReceiver(): VoiceReceiverNode | null;
|
|
1345
1316
|
/**
|
|
1346
1317
|
* The sync lyrics provider for this queue.
|
|
1347
1318
|
* @example const lyrics = await player.lyrics.search({ q: 'Alan Walker Faded' });
|
|
@@ -1606,6 +1577,8 @@ declare class Track<T = unknown> {
|
|
|
1606
1577
|
private __reqMetadataFn;
|
|
1607
1578
|
cleanTitle: string;
|
|
1608
1579
|
live: boolean;
|
|
1580
|
+
bridgedExtractor: BaseExtractor | null;
|
|
1581
|
+
bridgedTrack: Track | null;
|
|
1609
1582
|
/**
|
|
1610
1583
|
* Track constructor
|
|
1611
1584
|
* @param player The player that instantiated this Track
|
|
@@ -1751,7 +1724,7 @@ declare class Playlist {
|
|
|
1751
1724
|
title: string;
|
|
1752
1725
|
description: string;
|
|
1753
1726
|
thumbnail: any;
|
|
1754
|
-
type: "
|
|
1727
|
+
type: "album" | "playlist";
|
|
1755
1728
|
source: TrackSource;
|
|
1756
1729
|
author: {
|
|
1757
1730
|
name: string;
|
|
@@ -1776,10 +1749,165 @@ declare class Playlist {
|
|
|
1776
1749
|
play<T = unknown>(channel: GuildVoiceChannelResolvable, options?: PlayerNodeInitializerOptions<T>): Promise<PlayerNodeInitializationResult<T>>;
|
|
1777
1750
|
}
|
|
1778
1751
|
|
|
1752
|
+
type unsafe = any;
|
|
1753
|
+
/**
|
|
1754
|
+
* The receiver function that will be called when the context is provided
|
|
1755
|
+
*/
|
|
1756
|
+
type ContextReceiver<R> = () => R;
|
|
1757
|
+
declare class Context<T> {
|
|
1758
|
+
private defaultValue?;
|
|
1759
|
+
private storage;
|
|
1760
|
+
constructor(defaultValue?: T | undefined);
|
|
1761
|
+
/**
|
|
1762
|
+
* Exit out of this context
|
|
1763
|
+
*/
|
|
1764
|
+
exit(scope: ContextReceiver<void>): void;
|
|
1765
|
+
/**
|
|
1766
|
+
* Whether the context is lost
|
|
1767
|
+
*/
|
|
1768
|
+
get isLost(): boolean;
|
|
1769
|
+
/**
|
|
1770
|
+
* Get the current value of the context. If the context is lost and no default value is provided, undefined will be returned.
|
|
1771
|
+
*/
|
|
1772
|
+
consume(): T | undefined;
|
|
1773
|
+
/**
|
|
1774
|
+
* Run a function within the context of this provider
|
|
1775
|
+
*/
|
|
1776
|
+
provide<R = unsafe>(value: T, receiver: ContextReceiver<R>): R;
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* Create a new context. The default value is optional.
|
|
1780
|
+
* @param defaultValue The default value of the context
|
|
1781
|
+
* @example const userContext = createContext();
|
|
1782
|
+
*
|
|
1783
|
+
* // the value to provide
|
|
1784
|
+
* const user = {
|
|
1785
|
+
* id: 1,
|
|
1786
|
+
* name: 'John Doe'
|
|
1787
|
+
* };
|
|
1788
|
+
*
|
|
1789
|
+
* // provide the context value to the receiver
|
|
1790
|
+
* context.provide(user, handler);
|
|
1791
|
+
*
|
|
1792
|
+
* function handler() {
|
|
1793
|
+
* // get the context value
|
|
1794
|
+
* const { id, name } = useContext(context);
|
|
1795
|
+
*
|
|
1796
|
+
* console.log(id, name); // 1, John Doe
|
|
1797
|
+
* }
|
|
1798
|
+
*/
|
|
1799
|
+
declare function createContext<T = unsafe>(defaultValue?: T): Context<T>;
|
|
1800
|
+
/**
|
|
1801
|
+
* Get the current value of the context. If the context is lost and no default value is provided, undefined will be returned.
|
|
1802
|
+
* @param context The context to get the value from
|
|
1803
|
+
* @example const value = useContext(context);
|
|
1804
|
+
*/
|
|
1805
|
+
declare function useContext<T = unsafe>(context: Context<T>): T | undefined;
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* Fetch guild queue history
|
|
1809
|
+
* @param node guild queue node resolvable
|
|
1810
|
+
*/
|
|
1811
|
+
declare function useHistory<Meta = unknown>(): GuildQueueHistory<Meta> | null;
|
|
1812
|
+
declare function useHistory<Meta = unknown>(node: NodeResolvable): GuildQueueHistory<Meta> | null;
|
|
1813
|
+
|
|
1814
|
+
/**
|
|
1815
|
+
* Fetch guild queue player node
|
|
1816
|
+
* @param node Guild queue node resolvable
|
|
1817
|
+
*/
|
|
1818
|
+
declare function usePlayer<Meta = unknown>(): GuildQueuePlayerNode<Meta> | null;
|
|
1819
|
+
declare function usePlayer<Meta = unknown>(node: NodeResolvable): GuildQueuePlayerNode<Meta> | null;
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* Fetch guild queue
|
|
1823
|
+
* @param node Guild queue node resolvable
|
|
1824
|
+
*/
|
|
1825
|
+
declare function useQueue<Meta = unknown>(): GuildQueue<Meta> | null;
|
|
1826
|
+
declare function useQueue<Meta = unknown>(node: NodeResolvable): GuildQueue<Meta> | null;
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* Fetch main player instance
|
|
1830
|
+
* @deprecated
|
|
1831
|
+
*/
|
|
1832
|
+
declare function useMasterPlayer(): Player;
|
|
1833
|
+
/**
|
|
1834
|
+
* Fetch main player instance
|
|
1835
|
+
*/
|
|
1836
|
+
declare function useMainPlayer(): Player;
|
|
1837
|
+
|
|
1838
|
+
type SetterFN$1<T, P> = (previous: P) => T;
|
|
1839
|
+
type MetadataDispatch<T> = readonly [() => T, (metadata: T | SetterFN$1<T, T>) => void];
|
|
1840
|
+
/**
|
|
1841
|
+
* Fetch or manipulate guild queue metadata
|
|
1842
|
+
* @param node Guild queue node resolvable
|
|
1843
|
+
*/
|
|
1844
|
+
declare function useMetadata<T = unknown>(): MetadataDispatch<T>;
|
|
1845
|
+
declare function useMetadata<T = unknown>(node: NodeResolvable): MetadataDispatch<T>;
|
|
1846
|
+
|
|
1847
|
+
interface TimelineDispatcherOptions {
|
|
1848
|
+
ignoreFilters: boolean;
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* Fetch or manipulate current track
|
|
1852
|
+
* @param node Guild queue node resolvable
|
|
1853
|
+
* @param options Options for timeline dispatcher
|
|
1854
|
+
*/
|
|
1855
|
+
declare function useTimeline(node?: NodeResolvable, options?: Partial<TimelineDispatcherOptions>): {
|
|
1856
|
+
readonly timestamp: PlayerTimestamp;
|
|
1857
|
+
readonly volume: number;
|
|
1858
|
+
readonly paused: boolean;
|
|
1859
|
+
readonly track: Track<unknown> | null;
|
|
1860
|
+
pause(): boolean;
|
|
1861
|
+
resume(): boolean;
|
|
1862
|
+
setVolume(vol: number): boolean;
|
|
1863
|
+
setPosition(time: number): Promise<boolean>;
|
|
1864
|
+
} | null;
|
|
1865
|
+
|
|
1866
|
+
/**
|
|
1867
|
+
* Global onAfterCreateStream handler
|
|
1868
|
+
* @param handler The handler callback
|
|
1869
|
+
*/
|
|
1870
|
+
declare function onAfterCreateStream(handler: OnAfterCreateStreamHandler): void;
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* Global onBeforeCreateStream handler
|
|
1874
|
+
* @param handler The handler callback
|
|
1875
|
+
*/
|
|
1876
|
+
declare function onBeforeCreateStream(handler: OnBeforeCreateStreamHandler): void;
|
|
1877
|
+
|
|
1878
|
+
type SetterFN = (previous: number) => number;
|
|
1879
|
+
type VolumeDispatch = readonly [() => number, (volume: number | SetterFN) => boolean | undefined];
|
|
1880
|
+
/**
|
|
1881
|
+
* Fetch or manipulate player volume
|
|
1882
|
+
* @param node Guild queue node resolvable
|
|
1883
|
+
*/
|
|
1884
|
+
declare function useVolume(): VolumeDispatch;
|
|
1885
|
+
declare function useVolume(node: NodeResolvable): VolumeDispatch;
|
|
1886
|
+
|
|
1887
|
+
declare const instances: Collection<string, Player>;
|
|
1888
|
+
|
|
1889
|
+
declare const getPlayer: () => Player | null;
|
|
1890
|
+
interface HooksCtx {
|
|
1891
|
+
guild: Guild;
|
|
1892
|
+
}
|
|
1893
|
+
declare const getQueue: <T = unknown>(node: NodeResolvable) => GuildQueue<T> | null;
|
|
1894
|
+
interface HookDeclarationContext {
|
|
1895
|
+
getQueue: typeof getQueue;
|
|
1896
|
+
getPlayer: typeof getPlayer;
|
|
1897
|
+
instances: typeof instances;
|
|
1898
|
+
}
|
|
1899
|
+
type HookDeclaration<T extends (...args: any[]) => any> = (context: HookDeclarationContext) => T;
|
|
1900
|
+
declare function createHook<T extends HookDeclaration<(...args: any[]) => any>>(hook: T): ReturnType<T>;
|
|
1901
|
+
|
|
1779
1902
|
declare const knownExtractorKeys: readonly ["SpotifyExtractor", "AppleMusicExtractor", "SoundCloudExtractor", "YouTubeExtractor", "VimeoExtractor", "ReverbnationExtractor", "AttachmentExtractor"];
|
|
1780
1903
|
type ExtractorLoaderOptionDict = {
|
|
1781
1904
|
[K in (typeof knownExtractorKeys)[number]]?: ConstructorParameters<typeof _discord_player_extractor[K]>[1];
|
|
1782
1905
|
};
|
|
1906
|
+
interface ExtractorSession {
|
|
1907
|
+
id: string;
|
|
1908
|
+
attemptedExtractors: Set<string>;
|
|
1909
|
+
bridgeAttemptedExtractors: Set<string>;
|
|
1910
|
+
}
|
|
1783
1911
|
interface ExtractorExecutionEvents {
|
|
1784
1912
|
/**
|
|
1785
1913
|
* Emitted when a extractor is registered
|
|
@@ -1818,7 +1946,16 @@ declare class ExtractorExecutionContext extends PlayerEventsEmitter<ExtractorExe
|
|
|
1818
1946
|
* The extractors store
|
|
1819
1947
|
*/
|
|
1820
1948
|
store: Collection<string, BaseExtractor<object>>;
|
|
1949
|
+
readonly context: Context<ExtractorSession>;
|
|
1821
1950
|
constructor(player: Player);
|
|
1951
|
+
/**
|
|
1952
|
+
* Get the current execution id
|
|
1953
|
+
*/
|
|
1954
|
+
getExecutionId(): string | null;
|
|
1955
|
+
/**
|
|
1956
|
+
* Get the current execution context
|
|
1957
|
+
*/
|
|
1958
|
+
getContext(): ExtractorSession | null;
|
|
1822
1959
|
/**
|
|
1823
1960
|
* Load default extractors from `@discord-player/extractor`
|
|
1824
1961
|
*/
|
|
@@ -1869,7 +2006,7 @@ declare class ExtractorExecutionContext extends PlayerEventsEmitter<ExtractorExe
|
|
|
1869
2006
|
* @param track The track to request bridge for
|
|
1870
2007
|
* @param sourceExtractor The source extractor of the track
|
|
1871
2008
|
*/
|
|
1872
|
-
requestBridge(track: Track, sourceExtractor?: BaseExtractor | null): Promise<ExtractorExecutionResult<
|
|
2009
|
+
requestBridge(track: Track, sourceExtractor?: BaseExtractor | null): Promise<ExtractorExecutionResult<ExtractorStreamable>>;
|
|
1873
2010
|
/**
|
|
1874
2011
|
* Request bridge from the specified extractor
|
|
1875
2012
|
* @param track The track to request bridge for
|
|
@@ -2212,156 +2349,6 @@ declare class IPRotator {
|
|
|
2212
2349
|
static getRandomIP(address: string, start?: number, end?: number): string;
|
|
2213
2350
|
}
|
|
2214
2351
|
|
|
2215
|
-
type unsafe = any;
|
|
2216
|
-
/**
|
|
2217
|
-
* The receiver function that will be called when the context is provided
|
|
2218
|
-
*/
|
|
2219
|
-
type ContextReceiver<R> = () => R;
|
|
2220
|
-
declare class Context<T> {
|
|
2221
|
-
private defaultValue?;
|
|
2222
|
-
private storage;
|
|
2223
|
-
constructor(defaultValue?: T | undefined);
|
|
2224
|
-
/**
|
|
2225
|
-
* Exit out of this context
|
|
2226
|
-
*/
|
|
2227
|
-
exit(scope: ContextReceiver<void>): void;
|
|
2228
|
-
/**
|
|
2229
|
-
* Whether the context is lost
|
|
2230
|
-
*/
|
|
2231
|
-
get isLost(): boolean;
|
|
2232
|
-
/**
|
|
2233
|
-
* Get the current value of the context. If the context is lost and no default value is provided, undefined will be returned.
|
|
2234
|
-
*/
|
|
2235
|
-
consume(): T | undefined;
|
|
2236
|
-
/**
|
|
2237
|
-
* Run a function within the context of this provider
|
|
2238
|
-
*/
|
|
2239
|
-
provide<R = unsafe>(value: T, receiver: ContextReceiver<R>): R;
|
|
2240
|
-
}
|
|
2241
|
-
/**
|
|
2242
|
-
* Create a new context. The default value is optional.
|
|
2243
|
-
* @param defaultValue The default value of the context
|
|
2244
|
-
* @example const userContext = createContext();
|
|
2245
|
-
*
|
|
2246
|
-
* // the value to provide
|
|
2247
|
-
* const user = {
|
|
2248
|
-
* id: 1,
|
|
2249
|
-
* name: 'John Doe'
|
|
2250
|
-
* };
|
|
2251
|
-
*
|
|
2252
|
-
* // provide the context value to the receiver
|
|
2253
|
-
* context.provide(user, handler);
|
|
2254
|
-
*
|
|
2255
|
-
* function handler() {
|
|
2256
|
-
* // get the context value
|
|
2257
|
-
* const { id, name } = useContext(context);
|
|
2258
|
-
*
|
|
2259
|
-
* console.log(id, name); // 1, John Doe
|
|
2260
|
-
* }
|
|
2261
|
-
*/
|
|
2262
|
-
declare function createContext<T = unsafe>(defaultValue?: T): Context<T>;
|
|
2263
|
-
/**
|
|
2264
|
-
* Get the current value of the context. If the context is lost and no default value is provided, undefined will be returned.
|
|
2265
|
-
* @param context The context to get the value from
|
|
2266
|
-
* @example const value = useContext(context);
|
|
2267
|
-
*/
|
|
2268
|
-
declare function useContext<T = unsafe>(context: Context<T>): T | undefined;
|
|
2269
|
-
|
|
2270
|
-
/**
|
|
2271
|
-
* Fetch guild queue history
|
|
2272
|
-
* @param node guild queue node resolvable
|
|
2273
|
-
*/
|
|
2274
|
-
declare function useHistory<Meta = unknown>(): GuildQueueHistory<Meta> | null;
|
|
2275
|
-
declare function useHistory<Meta = unknown>(node: NodeResolvable): GuildQueueHistory<Meta> | null;
|
|
2276
|
-
|
|
2277
|
-
/**
|
|
2278
|
-
* Fetch guild queue player node
|
|
2279
|
-
* @param node Guild queue node resolvable
|
|
2280
|
-
*/
|
|
2281
|
-
declare function usePlayer<Meta = unknown>(): GuildQueuePlayerNode<Meta> | null;
|
|
2282
|
-
declare function usePlayer<Meta = unknown>(node: NodeResolvable): GuildQueuePlayerNode<Meta> | null;
|
|
2283
|
-
|
|
2284
|
-
/**
|
|
2285
|
-
* Fetch guild queue
|
|
2286
|
-
* @param node Guild queue node resolvable
|
|
2287
|
-
*/
|
|
2288
|
-
declare function useQueue<Meta = unknown>(): GuildQueue<Meta> | null;
|
|
2289
|
-
declare function useQueue<Meta = unknown>(node: NodeResolvable): GuildQueue<Meta> | null;
|
|
2290
|
-
|
|
2291
|
-
/**
|
|
2292
|
-
* Fetch main player instance
|
|
2293
|
-
* @deprecated
|
|
2294
|
-
*/
|
|
2295
|
-
declare function useMasterPlayer(): Player;
|
|
2296
|
-
/**
|
|
2297
|
-
* Fetch main player instance
|
|
2298
|
-
*/
|
|
2299
|
-
declare function useMainPlayer(): Player;
|
|
2300
|
-
|
|
2301
|
-
type SetterFN$1<T, P> = (previous: P) => T;
|
|
2302
|
-
type MetadataDispatch<T> = readonly [() => T, (metadata: T | SetterFN$1<T, T>) => void];
|
|
2303
|
-
/**
|
|
2304
|
-
* Fetch or manipulate guild queue metadata
|
|
2305
|
-
* @param node Guild queue node resolvable
|
|
2306
|
-
*/
|
|
2307
|
-
declare function useMetadata<T = unknown>(): MetadataDispatch<T>;
|
|
2308
|
-
declare function useMetadata<T = unknown>(node: NodeResolvable): MetadataDispatch<T>;
|
|
2309
|
-
|
|
2310
|
-
interface TimelineDispatcherOptions {
|
|
2311
|
-
ignoreFilters: boolean;
|
|
2312
|
-
}
|
|
2313
|
-
/**
|
|
2314
|
-
* Fetch or manipulate current track
|
|
2315
|
-
* @param node Guild queue node resolvable
|
|
2316
|
-
* @param options Options for timeline dispatcher
|
|
2317
|
-
*/
|
|
2318
|
-
declare function useTimeline(node?: NodeResolvable, options?: Partial<TimelineDispatcherOptions>): {
|
|
2319
|
-
readonly timestamp: PlayerTimestamp;
|
|
2320
|
-
readonly volume: number;
|
|
2321
|
-
readonly paused: boolean;
|
|
2322
|
-
readonly track: Track<unknown> | null;
|
|
2323
|
-
pause(): boolean;
|
|
2324
|
-
resume(): boolean;
|
|
2325
|
-
setVolume(vol: number): boolean;
|
|
2326
|
-
setPosition(time: number): Promise<boolean>;
|
|
2327
|
-
} | null;
|
|
2328
|
-
|
|
2329
|
-
/**
|
|
2330
|
-
* Global onAfterCreateStream handler
|
|
2331
|
-
* @param handler The handler callback
|
|
2332
|
-
*/
|
|
2333
|
-
declare function onAfterCreateStream(handler: OnAfterCreateStreamHandler): void;
|
|
2334
|
-
|
|
2335
|
-
/**
|
|
2336
|
-
* Global onBeforeCreateStream handler
|
|
2337
|
-
* @param handler The handler callback
|
|
2338
|
-
*/
|
|
2339
|
-
declare function onBeforeCreateStream(handler: OnBeforeCreateStreamHandler): void;
|
|
2340
|
-
|
|
2341
|
-
type SetterFN = (previous: number) => number;
|
|
2342
|
-
type VolumeDispatch = readonly [() => number, (volume: number | SetterFN) => boolean | undefined];
|
|
2343
|
-
/**
|
|
2344
|
-
* Fetch or manipulate player volume
|
|
2345
|
-
* @param node Guild queue node resolvable
|
|
2346
|
-
*/
|
|
2347
|
-
declare function useVolume(): VolumeDispatch;
|
|
2348
|
-
declare function useVolume(node: NodeResolvable): VolumeDispatch;
|
|
2349
|
-
|
|
2350
|
-
declare const instances: Collection<string, Player>;
|
|
2351
|
-
|
|
2352
|
-
declare const getPlayer: () => Player | null;
|
|
2353
|
-
interface HooksCtx {
|
|
2354
|
-
guild: Guild;
|
|
2355
|
-
}
|
|
2356
|
-
declare const getQueue: <T = unknown>(node: NodeResolvable) => GuildQueue<T> | null;
|
|
2357
|
-
interface HookDeclarationContext {
|
|
2358
|
-
getQueue: typeof getQueue;
|
|
2359
|
-
getPlayer: typeof getPlayer;
|
|
2360
|
-
instances: typeof instances;
|
|
2361
|
-
}
|
|
2362
|
-
type HookDeclaration<T extends (...args: any[]) => any> = (context: HookDeclarationContext) => T;
|
|
2363
|
-
declare function createHook<T extends HookDeclaration<(...args: any[]) => any>>(hook: T): ReturnType<T>;
|
|
2364
|
-
|
|
2365
2352
|
interface PlayerNodeInitializationResult<T = unknown> {
|
|
2366
2353
|
track: Track;
|
|
2367
2354
|
extractor: BaseExtractor | null;
|
|
@@ -2621,6 +2608,7 @@ interface GuildNodeCreateOptions<T = unknown> {
|
|
|
2621
2608
|
disableFilterer?: boolean;
|
|
2622
2609
|
disableBiquad?: boolean;
|
|
2623
2610
|
disableResampler?: boolean;
|
|
2611
|
+
disableFallbackStream?: boolean;
|
|
2624
2612
|
}
|
|
2625
2613
|
type NodeResolvable = GuildQueue | GuildResolvable;
|
|
2626
2614
|
declare class GuildNodeManager<Meta = unknown> {
|
|
@@ -3343,4 +3331,4 @@ declare class QueryResolver {
|
|
|
3343
3331
|
|
|
3344
3332
|
declare const version: string;
|
|
3345
3333
|
|
|
3346
|
-
export { AFilterGraph, AsyncQueue, AsyncQueueAcquisitionOptions, AsyncQueueEntry, AsyncQueueExceptionHandler, AudioFilters, BaseExtractor, Context, ContextReceiver, CreateStreamOps, DiscordPlayerQueryResultCache, Encodable, EqualizerConfigurationPreset, ExtractorExecutionContext, ExtractorExecutionEvents, ExtractorExecutionFN, ExtractorExecutionResult, ExtractorInfo, ExtractorLoaderOptionDict, ExtractorResolvable, ExtractorSearchContext, ExtractorStreamable, FFMPEG_ARGS_PIPED, FFMPEG_ARGS_STRING, FFMPEG_SRATE_REGEX, FFmpegFilterer, FFmpegStreamOptions, FilterGraph, FiltersName, GuildNodeCreateOptions, GuildNodeInit, GuildNodeManager, GuildQueue, GuildQueueAFiltersCache, GuildQueueAudioFilters, GuildQueueEvent, GuildQueueEvents, GuildQueueHistory, GuildQueuePlayerNode, GuildQueueStatistics, GuildQueueStatisticsMetadata, HookDeclaration, HookDeclarationContext, IPBlock, IPRotationConfig, IPRotator, LrcGetParams, LrcGetResult, LrcLib, LrcSearchParams, LrcSearchResult, MetadataDispatch, NextFunction, NodeResolvable, OnAfterCreateStreamHandler, OnBeforeCreateStreamHandler, PlayOptions, Player, PlayerEvent, PlayerEvents, PlayerEventsEmitter, PlayerInitOptions, PlayerNodeInitializationResult, PlayerNodeInitializerOptions, PlayerProgressbarOptions, PlayerSearchResult, PlayerTimestamp, PlayerTriggeredReason, Playlist, PlaylistInitData, PlaylistJSON, PostProcessedResult, QueryCache, QueryCacheOptions, QueryCacheProvider, QueryCacheResolverContext, QueryExtractorSearch, QueryResolver, QueryType, QueueFilters, QueueRepeatMode, RawTrackData,
|
|
3334
|
+
export { AFilterGraph, AsyncQueue, AsyncQueueAcquisitionOptions, AsyncQueueEntry, AsyncQueueExceptionHandler, AudioFilters, BaseExtractor, Context, ContextReceiver, CreateStreamOps, DiscordPlayerQueryResultCache, Encodable, EqualizerConfigurationPreset, ExtractorExecutionContext, ExtractorExecutionEvents, ExtractorExecutionFN, ExtractorExecutionResult, ExtractorInfo, ExtractorLoaderOptionDict, ExtractorResolvable, ExtractorSearchContext, ExtractorSession, ExtractorStreamable, FFMPEG_ARGS_PIPED, FFMPEG_ARGS_STRING, FFMPEG_SRATE_REGEX, FFmpegFilterer, FFmpegStreamOptions, FilterGraph, FiltersName, GuildNodeCreateOptions, GuildNodeInit, GuildNodeManager, GuildQueue, GuildQueueAFiltersCache, GuildQueueAudioFilters, GuildQueueEvent, GuildQueueEvents, GuildQueueHistory, GuildQueuePlayerNode, GuildQueueStatistics, GuildQueueStatisticsMetadata, HookDeclaration, HookDeclarationContext, IPBlock, IPRotationConfig, IPRotator, LrcGetParams, LrcGetResult, LrcLib, LrcSearchParams, LrcSearchResult, MetadataDispatch, NextFunction, NodeResolvable, OnAfterCreateStreamHandler, OnBeforeCreateStreamHandler, PlayOptions, Player, PlayerEvent, PlayerEvents, PlayerEventsEmitter, PlayerInitOptions, PlayerNodeInitializationResult, PlayerNodeInitializerOptions, PlayerProgressbarOptions, PlayerSearchResult, PlayerTimestamp, PlayerTriggeredReason, Playlist, PlaylistInitData, PlaylistJSON, PostProcessedResult, QueryCache, QueryCacheOptions, QueryCacheProvider, QueryCacheResolverContext, QueryExtractorSearch, QueryResolver, QueryType, QueueFilters, QueueRepeatMode, RawTrackData, RequestEntity, ResolvedQuery, ResourcePlayOptions, Runtime, RuntimeType, SearchOptions, SearchQueryType, SearchResult, SearchResultData, SequentialBucket, SerializedPlaylist, SerializedTrack, SerializedType, SetterFN$1 as SetterFN, SkipOptions, StreamConfig, StreamDispatcher, TimeData, TimelineDispatcherOptions, Track, TrackJSON, TrackLike, TrackResolvable, TrackSkipReason, TrackSource, TypeUtil, Util, VALIDATE_QUEUE_CAP, VoiceConnectConfig, VoiceEvents, VoiceStateHandler, VoiceUtils, WithMetadata, createContext, createErisCompat, createFFmpegStream, createHook, decode, deserialize, encode, isErisProxy, onAfterCreateStream, onBeforeCreateStream, serialize, tryIntoThumbnailString, useContext, useHistory, useMainPlayer, useMasterPlayer, useMetadata, usePlayer, useQueue, useTimeline, useVolume, version };
|