mirror of
https://github.com/musix-org/musix-oss
synced 2025-07-03 16:24:28 +00:00
Chore update 3.8
This commit is contained in:
@ -12,6 +12,5 @@ module.exports = {
|
||||
.setURL(client.config.invite)
|
||||
.setColor(client.config.embedColor)
|
||||
msg.channel.send(embed);
|
||||
msg.channel.send(client.messages.joinSupport + client.config.supportServer);
|
||||
}
|
||||
};
|
@ -49,23 +49,24 @@ module.exports = {
|
||||
const playlistId = url.split("/playlist/")[1].split("?")[0];
|
||||
spotify.getPlaylist(playlistId).then(
|
||||
async function (data) {
|
||||
searchPlaylist(data, client, msg, voiceChannel);
|
||||
},
|
||||
function (err) {
|
||||
console.log(err);
|
||||
msg.channel.send(client.messages.noResultsSpotify);
|
||||
}
|
||||
console.log(data.body)
|
||||
searchPlaylist(data, client, msg, voiceChannel);
|
||||
},
|
||||
function (err) {
|
||||
console.log(err);
|
||||
msg.channel.send(client.messages.noResultsSpotify);
|
||||
}
|
||||
);
|
||||
} else if (url.includes("album")) {
|
||||
const albumId = url.split("/album/")[1].split("?")[0];
|
||||
spotify.getAlbumTracks(albumId).then(
|
||||
async function (data) {
|
||||
searchAlbum(data, client, msg, voiceChannel);
|
||||
},
|
||||
function (err) {
|
||||
console.log(err);
|
||||
msg.channel.send(client.messages.noResultsSpotify);
|
||||
}
|
||||
searchAlbum(data, client, msg, voiceChannel);
|
||||
},
|
||||
function (err) {
|
||||
console.log(err);
|
||||
msg.channel.send(client.messages.noResultsSpotify);
|
||||
}
|
||||
);
|
||||
} else if (url.includes("track")) {
|
||||
return msg.channel.send(client.messages.disabledSpotifySongs);
|
||||
@ -115,8 +116,7 @@ module.exports = {
|
||||
return lmsg.edit(message);
|
||||
} else {
|
||||
ytsr(
|
||||
searchString,
|
||||
{
|
||||
searchString, {
|
||||
limit: 5,
|
||||
},
|
||||
function (err, res) {
|
||||
@ -154,24 +154,21 @@ async function searchPlaylist(data, client, msg, voiceChannel) {
|
||||
const track = await data.body.tracks.items[i].track;
|
||||
await client.funcs.sleep(250);
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} audio`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} audio`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} lyrics`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} lyrics`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name}`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name}`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
@ -244,24 +241,21 @@ async function searchAlbum(data, client, msg, voiceChannel) {
|
||||
const track = await data.body.items[i];
|
||||
await client.funcs.sleep(250);
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} audio`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} audio`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} lyrics`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} lyrics`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name}`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name}`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
@ -337,24 +331,21 @@ async function searchSong(data, client, msg, voiceChannel) {
|
||||
const track = await data.body.tracks.items[i].track;
|
||||
await client.funcs.sleep(250);
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} audio`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} audio`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name} lyrics`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name} lyrics`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
if (err) return console.log(err);
|
||||
if (!res.items[0]) {
|
||||
ytsr(
|
||||
`${track.artists[0].name} ${track.name}`,
|
||||
{
|
||||
`${track.artists[0].name} ${track.name}`, {
|
||||
limit: 5,
|
||||
},
|
||||
async function (err, res) {
|
||||
@ -418,4 +409,4 @@ async function searchSong(data, client, msg, voiceChannel) {
|
||||
)}\n${client.messages.failedToLoad + failed}`;
|
||||
}
|
||||
lmsg.edit(message);
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ module.exports = {
|
||||
if (client.funcs.check(client, msg, command)) {
|
||||
if (!queue.paused) return msg.channel.send(client.messages.notPaused);
|
||||
queue.paused = false;
|
||||
queue.connection.dispatcher.resume(true);
|
||||
queue.connection.dispatcher.resume();
|
||||
return msg.channel.send(client.messages.resumed);
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ module.exports = {
|
||||
queue.exists = false;
|
||||
}
|
||||
if (msg.guild.voice.channel) msg.guild.voice.channel.leave();
|
||||
client.queue.delete(guild.id);
|
||||
client.queue.delete(msg.guild.id);
|
||||
return msg.channel.send(client.messages.stop);
|
||||
}
|
||||
queue.songs = [];
|
||||
|
Reference in New Issue
Block a user