diff options
| author | TheEdgeNK <32907415+TheEdgeNK@users.noreply.github.com> | 2018-03-11 22:17:35 -0400 |
|---|---|---|
| committer | TheEdgeNK <32907415+TheEdgeNK@users.noreply.github.com> | 2018-03-11 22:17:35 -0400 |
| commit | 04abe1ecfac0d42d54315e41c9c8f42173205725 (patch) | |
| tree | 3b12ad842e8d9991ee380fdefa25ee0f73217ddc | |
| parent | aa8526d35c25d65c300b535a0bc4ef572335ee4f (diff) | |
| parent | 295b090c3f0254012005a09346873bf40fb34846 (diff) | |
| download | PokeBot-04abe1ecfac0d42d54315e41c9c8f42173205725.tar.gz PokeBot-04abe1ecfac0d42d54315e41c9c8f42173205725.tar.bz2 PokeBot-04abe1ecfac0d42d54315e41c9c8f42173205725.zip | |
Merge branch 'master' of https://github.com/PokeWorld/PokeBot
| -rw-r--r-- | Plugins/Music.js | 3 | ||||
| -rw-r--r-- | commands/Moderation/ban.js | 1 | ||||
| -rw-r--r-- | commands/Moderation/interrogate.js | 3 | ||||
| -rw-r--r-- | commands/Moderation/jail.js | 3 | ||||
| -rw-r--r-- | commands/Moderation/softban.js | 1 | ||||
| -rw-r--r-- | commands/Moderation/timeout.js | 3 | ||||
| -rw-r--r-- | commands/Moderation/warn.js | 1 |
7 files changed, 12 insertions, 3 deletions
diff --git a/Plugins/Music.js b/Plugins/Music.js index b72d40a..6d18146 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 { + bot.player.leave(msg.guild.id); + } }); } else { 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) |
