connection event
This commit is contained in:
parent
0cdcda381b
commit
58c3589295
2 changed files with 4 additions and 1 deletions
|
@ -66,6 +66,8 @@ class Queue<T = unknown> {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue