Merge branch 'master' of github.com:mudkipscience/Woomy

This commit is contained in:
TheCakeChicken 2020-04-19 00:23:02 +01:00
commit 128f12041e
7 changed files with 20 additions and 9 deletions

View file

@ -2,7 +2,7 @@ const API = require('nekos.life');
const {sfw} = new API();
exports.run = async (client, message, args) => {
if(!args[0]) {
return message.channel.send(`<:error:466995152976871434> You didn't say who you wanted to slap! Usage: \`${client.commands.get(`kiss`).help.usage}\``)
return message.channel.send(`<:error:466995152976871434> You didn't say who you wanted to slap! Usage: \`${client.commands.get(`slap`).help.usage}\``)
};
var people = "";

View file

@ -2,7 +2,7 @@ const Discord = require("discord.js");
const coolPeople = require('../../resources/other/coolpeople.json')
exports.run = (client, message, args) => {
var user, guild, status, createdAt, avurl, tag, id;
var nick, roles, presence, badges = "";
var nick = "", roles = "", presence = "", badges = "";
var coolPerson = false;
var friendos = coolPeople.coolPeople;

View file

@ -229,7 +229,7 @@ module.exports = async (client, message) => {
cooldown.delete(message.author.id);
}, 2000);
client.logger.cmd(`${client.config.permLevels.find(l => l.level === level).name} ${message.author.username} (${message.author.id}) ran command ${cmd.help.name}`);
client.logger.cmd(`${client.config.permLevels.find(l => l.level === level).name} ran command ${cmd.help.name}`);
cmd.run(client, message, args, level);
};

View file

@ -229,7 +229,16 @@ module.exports = client => {
};
id = item.id.videoId;
}
// music "playing", nothing in queue
if((client.music.getGuild(message.guild.id).playing || client.music.getGuild(message.guild.id).dispatcher) && client.music.getGuild(message.guild.id).queue.length == 0) {
client.music.getGuild(message.guild.id).playing = false;
client.music.getGuild(message.guild.id).dispatcher = null;
// music not playing, something is in queue
} else if(!client.music.getGuild(message.guild.id).playing && !client.music.getGuild(message.guild.id).dispatcher && client.music.getGuild(message.guild.id).queue.length > 0) {
client.music.getGuild(message.guild.id).queue = [];
};
if(client.music.getGuild(message.guild.id).queue.length == 0 || bypassQueue)
{
let meta = await client.music.getMeta(id);
@ -271,6 +280,8 @@ module.exports = client => {
{
let dispatcher = client.music.getGuild(message.guild.id).dispatcher = connection.play(await ytdl("https://www.youtube.com/watch?v=" + id, {highWaterMark: 1024 * 1024 * 32}), {type: 'opus'});
dispatcher.setVolume(0.25)
dispatcher.on('finish', (a, b) =>
{
end(a == "silent");
@ -377,6 +388,6 @@ module.exports = client => {
});
process.on("unhandledRejection", err => {
client.logger.error(`Unhandled rejection: ${err.stack}`);
client.logger.error(`Unhandled rejection: ${err}`);
});
};