Skip to content

Commit

Permalink
🐛 Add cancel option for music search results
Browse files Browse the repository at this point in the history
  • Loading branch information
Androz2091 committed Jan 3, 2021
1 parent 3f87609 commit 4e6c4be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/Atlanta.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ class Atlanta extends Client {
.setColor(this.config.embed.color);
message.channel.send(embed);
})
.on("searchInvalidResponse", (message, query, tracks) => {
.on("searchInvalidResponse", (message, query, tracks, content, collector) => {
if (content === "cancel") {
collector.stop();
return message.success("music/play:RESULTS_CANCEL");
}
message.error("misc:INVALID_NUMBER_RANGE", {
min: 1,
max: tracks.length
Expand Down

0 comments on commit 4e6c4be

Please sign in to comment.