1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 01:21:56 +00:00

Format update

This commit is contained in:
MatteZ02 2019-08-03 10:47:12 +03:00
parent 8c037a2b9a
commit 565ccfd9b6
6 changed files with 4 additions and 16 deletions

View File

@ -15,7 +15,7 @@ module.exports = {
.addField('```-skip | -s```', 'Skip a song.', true) .addField('```-skip | -s```', 'Skip a song.', true)
.addField('```-invite```', 'Invite Musix.', true) .addField('```-invite```', 'Invite Musix.', true)
.addField('```-ping```', 'See the current ping for Musix', true) .addField('```-ping```', 'See the current ping for Musix', true)
.addField('```-info```', 'Display info and instructions.', true) .addField('```-info```', 'Display the info', true)
.addField('```-help```', 'Display the help.', true) .addField('```-help```', 'Display the help.', true)
.setAuthor(client.user.username, client.user.displayAvatarURL) .setAuthor(client.user.username, client.user.displayAvatarURL)
.setColor('#b50002') .setColor('#b50002')

View File

@ -7,7 +7,7 @@ module.exports = {
.setTitle('**Musix instructions and info**:') .setTitle('**Musix instructions and info**:')
.addField('If you encounter any errors with musix please report about them on the offical musix support server!', 'https://discord.gg/rvHuJtB', true) .addField('If you encounter any errors with musix please report about them on the offical musix support server!', 'https://discord.gg/rvHuJtB', true)
.addField('On errors you can do -stop to reset the queue and try again!', 'To use all commands make sure you have `MANAGE_MESSAGES` and `MANAGE_CHANNELS` permissions!') .addField('On errors you can do -stop to reset the queue and try again!', 'To use all commands make sure you have `MANAGE_MESSAGES` and `MANAGE_CHANNELS` permissions!')
.addField('Current Ping in milliseconds', `${Math.floor(client.ping * 10) / 10} ms`, true) .addField('Current Ping', `${Math.floor(client.ping * 10) / 10} ms`, true)
.addField('Be careful with the Volume command! Volume is not recommended to be put over 3 with user volume at 100%!', 'Volume will reset to 1 always when a new song begins!', true) .addField('Be careful with the Volume command! Volume is not recommended to be put over 3 with user volume at 100%!', 'Volume will reset to 1 always when a new song begins!', true)
.setAuthor(client.user.username, client.user.displayAvatarURL) .setAuthor(client.user.username, client.user.displayAvatarURL)
.setColor('#b50002') .setColor('#b50002')

View File

@ -39,7 +39,7 @@ module.exports = {
const embed = new RichEmbed() const embed = new RichEmbed()
.setTitle("__Song Selection__") .setTitle("__Song Selection__")
.setDescription(`${videos.map(video2 => `**${++index}** \`${video2.title}\` `).join('\n')}`) .setDescription(`${videos.map(video2 => `**${++index}** \`${video2.title}\` `).join('\n')}`)
.setFooter("Please provide a number ranging from __1-10__ to select one of the search results.") .setFooter("Please provide a number ranging from 1-10 to select one of the search results.")
.setColor("#b50002") .setColor("#b50002")
message.channel.send(embed); message.channel.send(embed);
try { try {

View File

@ -39,7 +39,7 @@ module.exports = {
const embed = new RichEmbed() const embed = new RichEmbed()
.setTitle("__Song Selection__") .setTitle("__Song Selection__")
.setDescription(`${videos.map(video2 => `**${++index}** \`${video2.title}\` `).join('\n')}`) .setDescription(`${videos.map(video2 => `**${++index}** \`${video2.title}\` `).join('\n')}`)
.setFooter("Please provide a number ranging from __1-10__ to select one of the search results.") .setFooter("Please provide a number ranging from 1-10 to select one of the search results.")
.setColor("#b50002") .setColor("#b50002")
message.channel.send(embed); message.channel.send(embed);
try { try {

View File

@ -14,12 +14,6 @@ module.exports = {
if (page === 1) pagetext = ':arrow_down: Next in queue :arrow_down:' 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) {
let finalQueuemessage = queuemessage.slice(0, 1972).split('**#**').slice(0, -1).join('**#**');
const overflowSongsAmount = queuemessage.replace(finalQueuemessage, '').split('**#**').length;
finalQueuemessage += `\nI could not display all the songs at once. ${overflowSongsAmount} songs were not displayed here.`;
queuemessage = finalQueuemessage;
}
const hashs = queuemessage.split('**#**').length; const hashs = queuemessage.split('**#**').length;
for (let i = 0; i < hashs; i++) { for (let i = 0; i < hashs; i++) {
queuemessage = queuemessage.replace('**#**', `**${i + 1}**`); queuemessage = queuemessage.replace('**#**', `**${i + 1}**`);

View File

@ -14,12 +14,6 @@ module.exports = {
if (page === 1) pagetext = ':arrow_down: Next in queue :arrow_down:' 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) {
let finalQueuemessage = queuemessage.slice(0, 1972).split('**#**').slice(0, -1).join('**#**');
const overflowSongsAmount = queuemessage.replace(finalQueuemessage, '').split('**#**').length;
finalQueuemessage += `\nI could not display all the songs at once. ${overflowSongsAmount} songs were not displayed here.`;
queuemessage = finalQueuemessage;
}
const hashs = queuemessage.split('**#**').length; const hashs = queuemessage.split('**#**').length;
for (let i = 0; i < hashs; i++) { for (let i = 0; i < hashs; i++) {
queuemessage = queuemessage.replace('**#**', `**${i + 1}**`); queuemessage = queuemessage.replace('**#**', `**${i + 1}**`);