mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
fix error on error lol
This commit is contained in:
parent
7497da78b0
commit
e3cc5cfa80
1 changed files with 2 additions and 9 deletions
11
base/JaBa.js
11
base/JaBa.js
|
@ -74,18 +74,11 @@ class JaBa extends Client {
|
||||||
})
|
})
|
||||||
.on("searchDone", () => {})
|
.on("searchDone", () => {})
|
||||||
.on("searchCancel", message => message.error("misc:TIMES_UP"))
|
.on("searchCancel", message => message.error("misc:TIMES_UP"))
|
||||||
.on("searchInvalidAnswer", message => {
|
.on("searchInvalidAnswer", message => message.error("misc:INVALID_NUMBER_RANGE", { min: 1, max: tracks.length }))
|
||||||
if (message.content === "cancel") {
|
|
||||||
collector.stop();
|
|
||||||
return message.success("music/play:RESULTS_CANCEL");
|
|
||||||
};
|
|
||||||
|
|
||||||
message.error("misc:INVALID_NUMBER_RANGE", { min: 1, max: tracks.length });
|
|
||||||
})
|
|
||||||
.on("searchNoResult", message => message.error("music/play:NO_RESULT"))
|
.on("searchNoResult", message => message.error("music/play:NO_RESULT"))
|
||||||
.on("error", (textChannel, e) => {
|
.on("error", (textChannel, e) => {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
textChannel.send(this.translate("music/play:ERR_OCCURRED", { error: e.slice(0, 1900)}));
|
textChannel.send(this.translate("music/play:ERR_OCCURRED", { error: e }));
|
||||||
})
|
})
|
||||||
.on("finish", queue => queue.textChannel.send(this.translate("music/play:QUEUE_ENDED")))
|
.on("finish", queue => queue.textChannel.send(this.translate("music/play:QUEUE_ENDED")))
|
||||||
.on("disconnect", queue => queue.textChannel.send(this.translate("music/play:STOP_DISCONNECTED")))
|
.on("disconnect", queue => queue.textChannel.send(this.translate("music/play:STOP_DISCONNECTED")))
|
||||||
|
|
Loading…
Reference in a new issue