From 37e53964eb1a2177b0b80b22f87f7c3c49ff200e Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 11 Mar 2018 20:35:44 -0400 Subject: Auto stash before merge of "master" and "origin/master" --- Plugins/Music.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Plugins/Music.js b/Plugins/Music.js index b72d40a..cfffb19 100644 --- a/Plugins/Music.js +++ b/Plugins/Music.js @@ -42,6 +42,9 @@ exports.play = async (bot, msg, track) => { if (bot.queue.get(msg.guild.id)[0]) { player.play(bot.queue.get(msg.guild.id).shift()); } + else { + player.leave(msg.guild.id); + } }); } else { -- cgit v1.2.3 From 908bec2e72fec62c2d02d176192c057dccb82518 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 11 Mar 2018 20:37:36 -0400 Subject: trey is dumb --- commands/Moderation/ban.js | 1 + commands/Moderation/interrogate.js | 3 ++- commands/Moderation/jail.js | 3 ++- commands/Moderation/softban.js | 1 + commands/Moderation/timeout.js | 3 ++- commands/Moderation/warn.js | 1 + 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index dbc8fc6..5974c53 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -41,6 +41,7 @@ exports.run = async (bot, msg, args) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} banned ${member.user.tag}`, msg.author.avatarURL); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); msg.guild.channels.find('id', logChannel).send({ embed }); } catch (err) { diff --git a/commands/Moderation/interrogate.js b/commands/Moderation/interrogate.js index 1887d57..8fa9708 100644 --- a/commands/Moderation/interrogate.js +++ b/commands/Moderation/interrogate.js @@ -20,7 +20,7 @@ exports.run = async (bot, msg) => { if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - + if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to interrogate others. Rip-off detectives...'); if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot interrogate anyone.'); @@ -39,6 +39,7 @@ exports.run = async (bot, msg) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} interrogated ${member.user.tag}.`, msg.author.avatarURL); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); msg.guild.channels.find('id', logChannel).send({ embed }); } catch (err) { diff --git a/commands/Moderation/jail.js b/commands/Moderation/jail.js index 4c21b3f..9923540 100644 --- a/commands/Moderation/jail.js +++ b/commands/Moderation/jail.js @@ -20,7 +20,7 @@ exports.run = async (bot, msg) => { if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - + if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to put members in jail.'); if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot put anyone in jail.'); @@ -39,6 +39,7 @@ exports.run = async (bot, msg) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} put ${member.user.tag} in jail.`, msg.author.avatarURL); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); msg.guild.channels.find('id', logChannel).send({ embed }); } catch (err) { diff --git a/commands/Moderation/softban.js b/commands/Moderation/softban.js index 70cb1b3..2db58ec 100644 --- a/commands/Moderation/softban.js +++ b/commands/Moderation/softban.js @@ -41,6 +41,7 @@ exports.run = async (bot, msg, args) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} softbanned ${member.user.tag}`, msg.author.avatarURL); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); msg.guild.channels.find('id', logChannel).send({ embed }); } catch (err) { diff --git a/commands/Moderation/timeout.js b/commands/Moderation/timeout.js index 5fabd5f..af9c713 100644 --- a/commands/Moderation/timeout.js +++ b/commands/Moderation/timeout.js @@ -20,7 +20,7 @@ exports.run = async (bot, msg) => { if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!'); - + if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to put members in time-out..'); if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot put anyone in time-out.'); @@ -39,6 +39,7 @@ exports.run = async (bot, msg) => { .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} put ${member.user.tag} in time-out.`, msg.author.avatarURL); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); msg.guild.channels.find('id', logChannel).send({ embed }); } catch (err) { diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index fc965b7..816367d 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -40,6 +40,7 @@ exports.run = async (bot, msg, args) => { } const { RichEmbed } = require('discord.js'); + const logChannel = await bot.plugins.settings.getStr('logs', msg.guild.id); bot.channels.find('id', logChannel).send( new RichEmbed() .setColor(0x00ae86) -- cgit v1.2.3 From a687cb0faa5e55986b7e92fa07146dcf3e5c043e Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 11 Mar 2018 20:46:55 -0400 Subject: fixed --- Plugins/Music.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Music.js b/Plugins/Music.js index cfffb19..069957e 100644 --- a/Plugins/Music.js +++ b/Plugins/Music.js @@ -40,7 +40,7 @@ exports.play = async (bot, msg, track) => { player.play(bot.queue.get(msg.guild.id).shift()); player.on('end', () => { if (bot.queue.get(msg.guild.id)[0]) { - player.play(bot.queue.get(msg.guild.id).shift()); + player.play(bot, msg, bot.queue.get(msg.guild.id).shift()); } else { player.leave(msg.guild.id); -- cgit v1.2.3 From 295b090c3f0254012005a09346873bf40fb34846 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 11 Mar 2018 20:54:04 -0400 Subject: fix --- Plugins/Music.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Music.js b/Plugins/Music.js index 069957e..6d18146 100644 --- a/Plugins/Music.js +++ b/Plugins/Music.js @@ -40,10 +40,10 @@ exports.play = async (bot, msg, track) => { player.play(bot.queue.get(msg.guild.id).shift()); player.on('end', () => { if (bot.queue.get(msg.guild.id)[0]) { - player.play(bot, msg, bot.queue.get(msg.guild.id).shift()); + player.play(bot.queue.get(msg.guild.id).shift()); } else { - player.leave(msg.guild.id); + bot.player.leave(msg.guild.id); } }); } -- cgit v1.2.3