forked from embee/woomy
forceskip
This commit is contained in:
parent
8e850b1adf
commit
818a923a37
2 changed files with 30 additions and 0 deletions
22
commands/forceskip.js
Normal file
22
commands/forceskip.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
exports.conf = {
|
||||
enabled: true,
|
||||
guildOnly: true,
|
||||
aliases: [],
|
||||
permLevel: 'Moderator',
|
||||
requiredPerms: [],
|
||||
cooldown: 2000
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: 'forceskip',
|
||||
category: 'Music',
|
||||
description: 'Force skips currently playing song.',
|
||||
usage: 'forceskip',
|
||||
params: ''
|
||||
}
|
||||
|
||||
exports.run = async (client, message, args, level, data) => {
|
||||
client.music.skip(message.guild, 'forceskip');
|
||||
|
||||
message.reply('skipped currently playing music');
|
||||
};
|
|
@ -162,4 +162,12 @@ module.exports = client => {
|
|||
g.dispatcher.setVolume(target);
|
||||
};
|
||||
};
|
||||
|
||||
client.music.skip = function(guild, reason) {
|
||||
let g = client.music.getGuild(guild.id);
|
||||
|
||||
if(g.dispatcher) {
|
||||
g.dispatcher.end(reason);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue