From 1d55792f1fc1b79fbc06c8ceeb89f22fd7acb08c Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Fri, 25 Jun 2021 13:09:53 +0545 Subject: [PATCH] rename BasicStreamDispatcher --- src/Structures/Queue.ts | 3 ++- .../{BasicStreamDispatcher.ts => StreamDispatcher.ts} | 10 ++++++---- src/VoiceInterface/VoiceUtils.ts | 2 +- src/index.ts | 2 +- src/types/types.ts | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) rename src/VoiceInterface/{BasicStreamDispatcher.ts => StreamDispatcher.ts} (94%) diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index f513b17..1bae87d 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -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 { * Private method to handle autoplay * @param {Track} track The source track to find its similar track for autoplay * @returns {Promise} + * @private */ private async _handleAutoplay(track: Track): Promise { this.#watchDestroyed(); diff --git a/src/VoiceInterface/BasicStreamDispatcher.ts b/src/VoiceInterface/StreamDispatcher.ts similarity index 94% rename from src/VoiceInterface/BasicStreamDispatcher.ts rename to src/VoiceInterface/StreamDispatcher.ts index ddcb1d7..e89619f 100644 --- a/src/VoiceInterface/BasicStreamDispatcher.ts +++ b/src/VoiceInterface/StreamDispatcher.ts @@ -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) => any; // eslint-disable-line @typescript-eslint/no-explicit-any - finish: (resource: AudioResource) => 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) => any; + finish: (resource: AudioResource) => any; + /* eslint-enable @typescript-eslint/no-explicit-any */ } class StreamDispatcher extends EventEmitter { diff --git a/src/VoiceInterface/VoiceUtils.ts b/src/VoiceInterface/VoiceUtils.ts index 306acfb..5d34a7f 100644 --- a/src/VoiceInterface/VoiceUtils.ts +++ b/src/VoiceInterface/VoiceUtils.ts @@ -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 { diff --git a/src/index.ts b/src/index.ts index 5739670..2e0de02 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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"; diff --git a/src/types/types.ts b/src/types/types.ts index f999fb2..a041e70 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -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;