Skip to content

Commit

Permalink
PEBKAC PLS (TheSharks#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenkai authored and zaza7 committed Nov 6, 2016
1 parent 408ca4c commit 63fcab7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions runtime/internal/voice.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,17 @@ exports.volume = function (msg, suffix, bot) {
}

exports.skip = function (msg, suffix, bot) {
var connect = bot.VoiceConnections
.filter(function (connection) {
return connection.voiceConnection.guild.id === msg.guild.id
})
if (connect.length < 1) {
msg.reply('No connection.')
return
} else if (list[msg.guild.id] === undefined) {
msg.reply('Try requesting a song first before skipping.')
return
}
list[msg.guild.id].link.shift()
list[msg.guild.id].info.shift()
list[msg.guild.id].requester.shift()
Expand Down

0 comments on commit 63fcab7

Please sign in to comment.