mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-23 06:43:17 +00:00
Format update
This commit is contained in:
parent
21eda1f641
commit
8c037a2b9a
@ -5,8 +5,13 @@ module.exports = {
|
|||||||
async execute(message, args, client, RichEmbed) {
|
async execute(message, args, client, RichEmbed) {
|
||||||
const serverQueue = client.queue.get(message.guild.id);
|
const serverQueue = client.queue.get(message.guild.id);
|
||||||
if (!serverQueue) return message.channel.send(':x: There is nothing playing.');
|
if (!serverQueue) return message.channel.send(':x: There is nothing playing.');
|
||||||
|
if (args[1]) {
|
||||||
|
if (isNaN(args[1])) return msg.channel.send(':x: I\'m sorry, But you need to enter a valid __number__.');
|
||||||
|
}
|
||||||
let page = parseInt(args[1]);
|
let page = parseInt(args[1]);
|
||||||
if (!page) page = 1;
|
if (!page) page = 1;
|
||||||
|
let pagetext = `:page_facing_up: Page: ${page} :page_facing_up:`
|
||||||
|
if (page === 1) pagetext = ':arrow_down: Next in queue :arrow_down:'
|
||||||
let queuesongs = serverQueue.songs.slice((page - 1) * 20 + 1, page * 20 + 1);
|
let queuesongs = serverQueue.songs.slice((page - 1) * 20 + 1, page * 20 + 1);
|
||||||
let queuemessage = `${queuesongs.map(song => `**#** ${song.title}`).join('\n')}`
|
let queuemessage = `${queuesongs.map(song => `**#** ${song.title}`).join('\n')}`
|
||||||
if (queuemessage.length >= 1972) {
|
if (queuemessage.length >= 1972) {
|
||||||
@ -22,7 +27,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
const embed = new RichEmbed()
|
const embed = new RichEmbed()
|
||||||
.setTitle("__Song queue__")
|
.setTitle("__Song queue__")
|
||||||
.setDescription(`**Now playing:** ${serverQueue.songs[0].title}🎶\n:arrow_down: Next in queue :arrow_down:\n${queuemessage}`)
|
.setDescription(`**Now playing:** ${serverQueue.songs[0].title}🎶\n${pagetext}\n${queuemessage}`)
|
||||||
.setColor("#b50002")
|
.setColor("#b50002")
|
||||||
return message.channel.send(embed);
|
return message.channel.send(embed);
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,13 @@ module.exports = {
|
|||||||
async execute(message, args, client, RichEmbed) {
|
async execute(message, args, client, RichEmbed) {
|
||||||
const serverQueue = client.queue.get(message.guild.id);
|
const serverQueue = client.queue.get(message.guild.id);
|
||||||
if (!serverQueue) return message.channel.send(':x: There is nothing playing.');
|
if (!serverQueue) return message.channel.send(':x: There is nothing playing.');
|
||||||
|
if (args[1]) {
|
||||||
|
if (isNaN(args[1])) return msg.channel.send(':x: I\'m sorry, But you need to enter a valid __number__.');
|
||||||
|
}
|
||||||
let page = parseInt(args[1]);
|
let page = parseInt(args[1]);
|
||||||
if (!page) page = 1;
|
if (!page) page = 1;
|
||||||
|
let pagetext = `:page_facing_up: Page: ${page} :page_facing_up:`
|
||||||
|
if (page === 1) pagetext = ':arrow_down: Next in queue :arrow_down:'
|
||||||
let queuesongs = serverQueue.songs.slice((page - 1) * 20 + 1, page * 20 + 1);
|
let queuesongs = serverQueue.songs.slice((page - 1) * 20 + 1, page * 20 + 1);
|
||||||
let queuemessage = `${queuesongs.map(song => `**#** ${song.title}`).join('\n')}`
|
let queuemessage = `${queuesongs.map(song => `**#** ${song.title}`).join('\n')}`
|
||||||
if (queuemessage.length >= 1972) {
|
if (queuemessage.length >= 1972) {
|
||||||
@ -22,7 +27,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
const embed = new RichEmbed()
|
const embed = new RichEmbed()
|
||||||
.setTitle("__Song queue__")
|
.setTitle("__Song queue__")
|
||||||
.setDescription(`**Now playing:** ${serverQueue.songs[0].title}🎶\n:arrow_down: Next in queue :arrow_down:\n${queuemessage}`)
|
.setDescription(`**Now playing:** ${serverQueue.songs[0].title}🎶\n${pagetext}\n${queuemessage}`)
|
||||||
.setColor("#b50002")
|
.setColor("#b50002")
|
||||||
return message.channel.send(embed);
|
return message.channel.send(embed);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user