mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
Фиксики
This commit is contained in:
parent
29a89d59c9
commit
6964ec9e47
3 changed files with 21 additions and 27 deletions
|
@ -25,13 +25,11 @@ class Playlists extends Command {
|
||||||
let playlist;
|
let playlist;
|
||||||
|
|
||||||
for (const pl of playlists) {
|
for (const pl of playlists) {
|
||||||
if (pl.name === name) {
|
if (!pl.name === name) return message.error("music/removeplaylist:NOT_FOUND", {
|
||||||
playlist = pl;
|
|
||||||
} else {
|
|
||||||
message.error("music/removeplaylist:NOT_FOUND", {
|
|
||||||
name
|
name
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
playlist = pl;
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
|
|
|
@ -23,13 +23,11 @@ class PlayPlaylists extends Command {
|
||||||
const name = args.join(" ");
|
const name = args.join(" ");
|
||||||
let playlist;
|
let playlist;
|
||||||
for (const pl of data.userData.playlists) {
|
for (const pl of data.userData.playlists) {
|
||||||
if (pl.name === name) {
|
if (!pl.name === name) return message.error("music/removeplaylist:NOT_FOUND", {
|
||||||
playlist = new DisTube.Playlist(pl);
|
|
||||||
} else {
|
|
||||||
return message.error("music/removeplaylist:NOT_FOUND", {
|
|
||||||
name
|
name
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
playlist = new DisTube.Playlist(pl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
|
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
|
||||||
|
|
|
@ -22,7 +22,10 @@ class RemovePlaylist extends Command {
|
||||||
|
|
||||||
const playlists = data.userData.playlists;
|
const playlists = data.userData.playlists;
|
||||||
for (const playlist of playlists) {
|
for (const playlist of playlists) {
|
||||||
if (playlist.name === name) {
|
if (!playlist.name === name) return message.error("music/removeplaylist:NOT_FOUND", {
|
||||||
|
name
|
||||||
|
});
|
||||||
|
|
||||||
const index = playlists.indexOf(playlist);
|
const index = playlists.indexOf(playlist);
|
||||||
playlists.splice(index, 1);
|
playlists.splice(index, 1);
|
||||||
|
|
||||||
|
@ -32,11 +35,6 @@ class RemovePlaylist extends Command {
|
||||||
message.success("music/removeplaylist:REMOVED", {
|
message.success("music/removeplaylist:REMOVED", {
|
||||||
name
|
name
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
message.error("music/removeplaylist:NOT_FOUND", {
|
|
||||||
name
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue