diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index e828a64..36de580 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -66,6 +66,8 @@ class Queue { this.connection.on("error", (err) => this.player.emit("error", this, err)); this.connection.on("debug", (msg) => this.player.emit("debug", this, msg)); + this.player.emit("connectionCreate", this, this.connection); + return this; } diff --git a/src/types/types.ts b/src/types/types.ts index 36a9344..3a5d01a 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -4,6 +4,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"; export type FiltersName = keyof QueueFilters; @@ -130,7 +131,7 @@ export interface PlayerEvents { /** * Emitted when bot connects to a voice channel */ - connectionCreate: (queue: Queue) => any; + connectionCreate: (queue: Queue, connection: StreamDispatcher) => any; /** * Debug information */