forked from embee/woomy
Merge branch 'next' of github.com:mudkipscience/Woomy into next
This commit is contained in:
commit
d484ecd9c1
5 changed files with 43 additions and 3 deletions
|
@ -9,7 +9,7 @@ exports.conf = {
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: 'emoji',
|
name: 'emoji',
|
||||||
category: 'Utility',
|
category: 'Utility',
|
||||||
description: 'Enlarges a custom emoji.',
|
description: 'Enlarges a custom emoji (cannot be used to enlarge normal emojis)',
|
||||||
usage: 'emoji [emoji]',
|
usage: 'emoji [emoji]',
|
||||||
parameters: '`[emoji] - Custom emoji you want to enlarge'
|
parameters: '`[emoji] - Custom emoji you want to enlarge'
|
||||||
}
|
}
|
||||||
|
|
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');
|
||||||
|
};
|
|
@ -4,7 +4,8 @@ exports.conf = {
|
||||||
aliases: [],
|
aliases: [],
|
||||||
permLevel: 'User',
|
permLevel: 'User',
|
||||||
requiredPerms: [],
|
requiredPerms: [],
|
||||||
cooldown: 2000
|
cooldown: 2000,
|
||||||
|
joinArguments: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|
|
@ -106,6 +106,15 @@ module.exports = async (client, message) => {
|
||||||
message.flags.push(args.shift().slice(1))
|
message.flags.push(args.shift().slice(1))
|
||||||
}
|
}
|
||||||
|
|
||||||
client.logger.log(`Command ran: ${cmd.help.name}`)
|
let argsPossiblyJoined = args;
|
||||||
cmd.run(client, message, args, level, data)
|
|
||||||
|
if(cmd.conf.joinArguments) {
|
||||||
|
if(args.length > cmd.conf.joinArguments && args.length > 1)
|
||||||
|
{
|
||||||
|
argsPossiblyJoined[cmd.conf.joinArguments - 1] = args.slice(cmd.conf.joinArguments - 1).join(' ');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
client.logger.log(`Command ran: ${cmd.help.name}`)
|
||||||
|
cmd.run(client, message, argsPossiblyJoined, level, data)
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,4 +162,12 @@ module.exports = client => {
|
||||||
g.dispatcher.setVolume(target);
|
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