rename BasicStreamDispatcher

This commit is contained in:
Snowflake107 2021-06-25 13:09:53 +05:45
parent 62c16d86dd
commit 1d55792f1f
5 changed files with 11 additions and 8 deletions

View file

@ -1,6 +1,6 @@
import { Collection, Guild, StageChannel, VoiceChannel } from "discord.js";
import { Player } from "../Player";
import { StreamDispatcher } from "../VoiceInterface/BasicStreamDispatcher";
import { StreamDispatcher } from "../VoiceInterface/StreamDispatcher";
import Track from "./Track";
import { PlayerOptions, PlayerProgressbarOptions, PlayOptions, QueueFilters, QueueRepeatMode } from "../types/types";
import ytdl from "discord-ytdl-core";
@ -616,6 +616,7 @@ class Queue<T = unknown> {
* Private method to handle autoplay
* @param {Track} track The source track to find its similar track for autoplay
* @returns {Promise<void>}
* @private
*/
private async _handleAutoplay(track: Track): Promise<void> {
this.#watchDestroyed();

View file

@ -18,10 +18,12 @@ import Track from "../Structures/Track";
import { Util } from "../utils/Util";
export interface VoiceEvents {
error: (error: AudioPlayerError) => any; // eslint-disable-line @typescript-eslint/no-explicit-any
debug: (message: string) => any; // eslint-disable-line @typescript-eslint/no-explicit-any
start: (resource: AudioResource<Track>) => any; // eslint-disable-line @typescript-eslint/no-explicit-any
finish: (resource: AudioResource<Track>) => any; // eslint-disable-line @typescript-eslint/no-explicit-any
/* eslint-disable @typescript-eslint/no-explicit-any */
error: (error: AudioPlayerError) => any;
debug: (message: string) => any;
start: (resource: AudioResource<Track>) => any;
finish: (resource: AudioResource<Track>) => any;
/* eslint-enable @typescript-eslint/no-explicit-any */
}
class StreamDispatcher extends EventEmitter<VoiceEvents> {

View file

@ -1,6 +1,6 @@
import { VoiceChannel, StageChannel, Collection, Snowflake } from "discord.js";
import { DiscordGatewayAdapterCreator, entersState, joinVoiceChannel, VoiceConnection, VoiceConnectionStatus } from "@discordjs/voice";
import { StreamDispatcher } from "./BasicStreamDispatcher";
import { StreamDispatcher } from "./StreamDispatcher";
import { VoiceAdapterCreator } from "./AdapterCreator";
class VoiceUtils {

View file

@ -8,6 +8,6 @@ export { StreamUtils } from "./utils/StreamUtils";
export { Track } from "./Structures/Track";
export { Util } from "./utils/Util";
export { VoiceUtils } from "./VoiceInterface/VoiceUtils";
export { VoiceEvents, StreamDispatcher } from "./VoiceInterface/BasicStreamDispatcher";
export { VoiceEvents, StreamDispatcher } from "./VoiceInterface/StreamDispatcher";
export { VoiceAdapterCreator } from "./VoiceInterface/AdapterCreator";
export * from "./types/types";

View file

@ -3,7 +3,7 @@ import { Readable, Duplex } from "stream";
import { Queue } from "../Structures/Queue";
import Track from "../Structures/Track";
import { Playlist } from "../Structures/Playlist";
import { StreamDispatcher } from "../VoiceInterface/BasicStreamDispatcher";
import { StreamDispatcher } from "../VoiceInterface/StreamDispatcher";
import { downloadOptions } from "ytdl-core";
export type FiltersName = keyof QueueFilters;