Skip to content

Commit

Permalink
chore(Release): 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skick1234 committed Apr 20, 2024
1 parent 141782f commit 83d785b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "distube",
"version": "4.1.1",
"version": "4.2.0",
"description": "A Discord.js module to simplify your music commands and play songs with audio filters on Discord without any API key.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/core/manager/QueueManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class QueueManager extends GuildIdManager<Queue> {
return true;
}
const stream = this.createStream(queue);
stream.on("debug", data => this.emit(Events.FFMPEG_DEBUG, `[${queue.id}] - ${data}`));
stream.on("debug", data => this.emit(Events.FFMPEG_DEBUG, `[${queue.id}]: ${data}`));
queue.voice.play(stream);
song.streamURL = stream.url;
return false;
Expand Down
54 changes: 37 additions & 17 deletions src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,44 @@ import type { Cookie } from "@distube/ytdl-core";

export type Awaitable<T = any> = T | PromiseLike<T>;

// export type DisTubeEvents = {
// [Events.ADD_LIST]: [queue: Queue, playlist: Playlist];
// [Events.ADD_SONG]: [queue: Queue, song: Song];
// [Events.DELETE_QUEUE]: [queue: Queue];
// [Events.DISCONNECT]: [queue: Queue];
// [Events.EMPTY]: [queue: Queue];
// [Events.ERROR]: [channel: GuildTextBasedChannel | undefined, error: Error];
// [Events.FFMPEG_DEBUG]: [debug: string];
// [Events.FINISH]: [queue: Queue];
// [Events.FINISH_SONG]: [queue: Queue, song: Song];
// [Events.INIT_QUEUE]: [queue: Queue];
// [Events.NO_RELATED]: [queue: Queue];
// [Events.PLAY_SONG]: [queue: Queue, song: Song];
// [Events.SEARCH_CANCEL]: [message: Message<true>, query: string];
// [Events.SEARCH_DONE]: [message: Message<true>, answer: Message<true>, query: string];
// [Events.SEARCH_INVALID_ANSWER]: [message: Message<true>, answer: Message<true>, query: string];
// [Events.SEARCH_NO_RESULT]: [message: Message<true>, query: string];
// [Events.SEARCH_RESULT]: [message: Message<true>, results: SearchResult[], query: string];
// };

export type DisTubeEvents = {
[Events.ADD_LIST]: [queue: Queue, playlist: Playlist];
[Events.ADD_SONG]: [queue: Queue, song: Song];
[Events.DELETE_QUEUE]: [queue: Queue];
[Events.DISCONNECT]: [queue: Queue];
[Events.EMPTY]: [queue: Queue];
[Events.ERROR]: [channel: GuildTextBasedChannel | undefined, error: Error];
[Events.FFMPEG_DEBUG]: [debug: string];
[Events.FINISH]: [queue: Queue];
[Events.FINISH_SONG]: [queue: Queue, song: Song];
[Events.INIT_QUEUE]: [queue: Queue];
[Events.NO_RELATED]: [queue: Queue];
[Events.PLAY_SONG]: [queue: Queue, song: Song];
[Events.SEARCH_CANCEL]: [message: Message<true>, query: string];
[Events.SEARCH_DONE]: [message: Message<true>, answer: Message<true>, query: string];
[Events.SEARCH_INVALID_ANSWER]: [message: Message<true>, answer: Message<true>, query: string];
[Events.SEARCH_NO_RESULT]: [message: Message<true>, query: string];
[Events.SEARCH_RESULT]: [message: Message<true>, results: SearchResult[], query: string];
addList: [queue: Queue, playlist: Playlist];
addSong: [queue: Queue, song: Song];
deleteQueue: [queue: Queue];
disconnect: [queue: Queue];
empty: [queue: Queue];
error: [channel: GuildTextBasedChannel | undefined, error: Error];
ffmpegDebug: [debug: string];
finish: [queue: Queue];
finishSong: [queue: Queue, song: Song];
initQueue: [queue: Queue];
noRelated: [queue: Queue];
playSong: [queue: Queue, song: Song];
searchCancel: [message: Message<true>, query: string];
searchDone: [message: Message<true>, answer: Message<true>, query: string];
searchInvalidAnswer: [message: Message<true>, answer: Message<true>, query: string];
searchNoResult: [message: Message<true>, query: string];
searchResult: [message: Message<true>, results: SearchResult[], query: string];
};

export type TypedDisTubeEvents = {
Expand Down

0 comments on commit 83d785b

Please sign in to comment.