forked from embee/woomy
polish
This commit is contained in:
parent
a31dc02568
commit
5c6938369d
8 changed files with 31 additions and 25 deletions
|
@ -45,16 +45,16 @@ module.exports.run = (client, message, args, level) => {
|
|||
}
|
||||
|
||||
if (oldPosition < 1 || oldPosition >= queue.length) {
|
||||
return message.channel.send('<:error:466995152976871434> Invalid song ID.')
|
||||
return message.channel.send('<:error:466995152976871434> Old position is not a valid song ID.')
|
||||
}
|
||||
|
||||
if (newPosition < 1 || newPosition >= queue.length) {
|
||||
return message.channel.send('<:error:466995152976871434> Invalid song ID.')
|
||||
return message.channel.send('<:error:466995152976871434> New position is not a valid song ID.')
|
||||
}
|
||||
|
||||
const songName = queue[oldPosition].video.title
|
||||
|
||||
queue.splice(newPosition, 0, queue.splice(oldPosition, 1)[0])
|
||||
|
||||
message.channel.send(`Moved **${songName}** from position \`${oldPosition}\` to \`${newPosition}\``)
|
||||
message.channel.send(`<:success:466995111885144095> Moved **${songName}** from position \`${oldPosition}\` to \`${newPosition}\``)
|
||||
}
|
||||
|
|
|
@ -22,16 +22,16 @@ exports.run = async (client, message, args, level, data) => {
|
|||
const guild = getGuild(message.guild.id)
|
||||
|
||||
if (guild.paused === true) {
|
||||
return message.channel.send('The music has already been paused! Run resume to start the music again.')
|
||||
return message.channel.send('<:error:466995152976871434> The music has already been paused! Run resume to start the music again.')
|
||||
}
|
||||
|
||||
if (guild.queue.length < 1 || guild.playing === false) {
|
||||
return message.channel.send('Nothing is playing!')
|
||||
return message.channel.send('<:error:466995152976871434> Nothing is playing!')
|
||||
}
|
||||
|
||||
guild.playing = false
|
||||
guild.paused = true
|
||||
guild.dispatcher.pause()
|
||||
|
||||
message.channel.send('Music paused!')
|
||||
message.channel.send('<:pause:467639357961142273> Music playback has been paused.')
|
||||
}
|
||||
|
|
|
@ -32,20 +32,16 @@ module.exports.run = (client, message, args, level) => {
|
|||
var input = +args[0]
|
||||
|
||||
if (isNaN(input) === true) {
|
||||
return message.channel.send('That isn\'t a number! You need to tell me the songs position in the queue (1, 2, etc.)')
|
||||
return message.channel.send('<:error:466995152976871434> That isn\'t a number! You need to tell me the songs position in the queue (1, 2, etc.)')
|
||||
}
|
||||
|
||||
if (input >= queue.length) {
|
||||
return message.channel.send('Invalid (too large)')
|
||||
}
|
||||
|
||||
if (input < 1) {
|
||||
return message.channel.send('Invalid (too small)')
|
||||
if (input >= queue.length || input < 1) {
|
||||
return message.channel.send('<:error:466995152976871434> Input is not a valid song ID.')
|
||||
}
|
||||
|
||||
var songName = queue[input].video.title
|
||||
|
||||
queue.splice(input, 1)
|
||||
|
||||
message.channel.send(`Removed from queue: **${songName}**`)
|
||||
message.channel.send(`<:success:466995111885144095> Removed from queue: **${songName}**`)
|
||||
}
|
||||
|
|
|
@ -22,16 +22,16 @@ exports.run = async (client, message, args, level, data) => {
|
|||
const guild = getGuild(message.guild.id)
|
||||
|
||||
if (guild.paused === false) {
|
||||
return message.channel.send('The music is already playing, use pause to pause the music first!')
|
||||
return message.channel.send('<:error:466995152976871434> The music is already playing, use pause to pause the music first!')
|
||||
}
|
||||
|
||||
if (guild.queue.length < 1) {
|
||||
return message.channel.send('Nothing is playing!')
|
||||
return message.channel.send('<:error:466995152976871434> Nothing is playing!')
|
||||
}
|
||||
|
||||
guild.playing = true
|
||||
guild.paused = false
|
||||
guild.dispatcher.resume()
|
||||
|
||||
message.channel.send('Music resumed!')
|
||||
message.channel.send('<:success:466995111885144095> Music playback has been resumed.')
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ const { getGuild } = require('../utils/music')
|
|||
module.exports.run = (client, message, args, level) => {
|
||||
var queue = getGuild(message.guild.id).queue
|
||||
|
||||
if (queue.length < 3) {
|
||||
return message.channel.send('Not enough songs are in the queue for this command to work!')
|
||||
if (queue.length < 4) {
|
||||
return message.channel.send('<:error:466995152976871434> There aren\'t enough songs are in the queue for this command to work!')
|
||||
}
|
||||
|
||||
const max = queue.length - 1
|
||||
|
@ -34,5 +34,5 @@ module.exports.run = (client, message, args, level) => {
|
|||
queue[i] = itemAtIndex
|
||||
}
|
||||
|
||||
message.channel.send('Queue shuffled!')
|
||||
message.channel.send('<:success:466995111885144095> Queue shuffled!')
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@ const { skip } = require('../utils/music')
|
|||
exports.run = async (client, message, args, level, data) => {
|
||||
skip(message.guild, 'skip')
|
||||
|
||||
message.reply('skipped currently playing music')
|
||||
message.reply('<:success:466995111885144095> Song skipped.')
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ exports.conf = {
|
|||
enabled: true,
|
||||
guildOnly: true,
|
||||
aliases: ['vol'],
|
||||
permLevel: 'Moderator',
|
||||
permLevel: 'User',
|
||||
requiredPerms: [],
|
||||
cooldown: 2000
|
||||
}
|
||||
|
@ -19,7 +19,17 @@ exports.help = {
|
|||
|
||||
const { setVolume } = require('../utils/music')
|
||||
exports.run = async (client, message, args, level, data) => {
|
||||
let userVolume = args[0]
|
||||
let userVolume
|
||||
|
||||
if (args[0].includes('%')) {
|
||||
userVolume.replace('%', '')
|
||||
}
|
||||
|
||||
userVolume = +userVolume
|
||||
|
||||
if (isNaN(userVolume) === true) {
|
||||
return message.channel.send('<:error:466995152976871434> Input must be a number!')
|
||||
}
|
||||
|
||||
if (userVolume) {
|
||||
userVolume = Number(userVolume)
|
||||
|
|
|
@ -39,7 +39,7 @@ exports.run = (client, message, args, level) => {
|
|||
skip(message.guild, 'skip')
|
||||
|
||||
message.channel.send(
|
||||
'<:skip:467216735356059660> Song has been skipped by the user who requested it.'
|
||||
'<:success:466995111885144095> Song has been skipped by the user who requested it.'
|
||||
)
|
||||
|
||||
return
|
||||
|
@ -52,7 +52,7 @@ exports.run = (client, message, args, level) => {
|
|||
skip(message.guild, 'skip')
|
||||
|
||||
message.channel.send(
|
||||
'<:skip:467216735356059660> Song has been skipped.'
|
||||
'<:skip:467216735356059660> Song skipped.'
|
||||
)
|
||||
} else {
|
||||
message.channel.send(
|
||||
|
|
Loading…
Reference in a new issue