aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjtsshieh <jtsshieh@outlook.com>2018-03-09 20:45:14 -0500
committerjtsshieh <jtsshieh@outlook.com>2018-03-09 20:45:14 -0500
commit54505ce7eb1aee434a19c5c5bd30f4f7b888c407 (patch)
treee60ea8675570d4a76cf756abdef282d01b98df8d
parent0575a6687efd388220f8e83c5983ce1d972bc966 (diff)
parent4d253ab491041e147e9943d8820ba06f611df2d5 (diff)
downloadPokeBot-54505ce7eb1aee434a19c5c5bd30f4f7b888c407.tar.gz
PokeBot-54505ce7eb1aee434a19c5c5bd30f4f7b888c407.tar.bz2
PokeBot-54505ce7eb1aee434a19c5c5bd30f4f7b888c407.zip
Merge branch 'master' of https://github.com/PokeWorld/PokeBot
-rw-r--r--commands/Moderation/ban.js2
-rw-r--r--commands/Moderation/kick.js2
-rw-r--r--commands/Moderation/purge.js2
-rw-r--r--commands/Moderation/softban.js2
-rw-r--r--commands/Moderation/timeout.js40
-rw-r--r--commands/Moderation/warn.js2
-rw-r--r--commands/Pokemon/forcedrop.js2
7 files changed, 46 insertions, 6 deletions
diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js
index 29cd566..a863341 100644
--- a/commands/Moderation/ban.js
+++ b/commands/Moderation/ban.js
@@ -19,7 +19,7 @@
* *************************************/
exports.run = async (bot, msg, args) => {
- if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permssion to ban members.');
+ if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to ban members.');
if (!msg.guild.member(bot.user).hasPermission('BAN_MEMBERS')) return msg.reply('I don\'t have permssion to ban members.');
const member = msg.mentions.members.first();
diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js
index ee7bf99..ccd3379 100644
--- a/commands/Moderation/kick.js
+++ b/commands/Moderation/kick.js
@@ -19,7 +19,7 @@
* *************************************/
exports.run = async (bot, msg, args) => {
- if (!msg.member.hasPermission('KICK_MEMBERS')) return msg.reply('You don\'t have permssion to kick members.');
+ if (!msg.member.hasPermission('KICK_MEMBERS')) return msg.reply('You don\'t have permission to kick members.');
if (!msg.guild.member(bot.user).hasPermission('KICK_MEMBERS')) return msg.reply('I don\'t have permssion to kick members.');
const member = msg.mentions.members.first();
diff --git a/commands/Moderation/purge.js b/commands/Moderation/purge.js
index fbb381d..1e81a3e 100644
--- a/commands/Moderation/purge.js
+++ b/commands/Moderation/purge.js
@@ -19,7 +19,7 @@
* *************************************/
exports.run = async (bot, msg, args) => {
- if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permssion to manage messages.');
+ if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permission to manage messages.');
if (!msg.guild.member(bot.user).hasPermission('MANAGE_MESSAGES')) return msg.reply('I don\'t have permssion to manage messages.');
const user = msg.mentions.users.first();
diff --git a/commands/Moderation/softban.js b/commands/Moderation/softban.js
index 69a7fd3..9193b79 100644
--- a/commands/Moderation/softban.js
+++ b/commands/Moderation/softban.js
@@ -19,7 +19,7 @@
* *************************************/
exports.run = async (bot, msg, args) => {
- if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permssion to ban members.');
+ if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to ban members.');
if (!msg.guild.member(bot.user).hasPermission('BAN_MEMBERS')) return msg.reply('I don\'t have permssion to ban members.');
const member = msg.mentions.members.first();
diff --git a/commands/Moderation/timeout.js b/commands/Moderation/timeout.js
index b78e059..c74ecf0 100644
--- a/commands/Moderation/timeout.js
+++ b/commands/Moderation/timeout.js
@@ -18,6 +18,7 @@
*
* *************************************/
+<<<<<<< HEAD
exports.run = async (bot, msg) => {
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.');
@@ -55,3 +56,42 @@ exports.help = {
description: 'Put a user in time-out',
usage: '@user',
};
+=======
+exports.run = async (bot, msg, args) => {
+ 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.');
+
+ const member = msg.mentions.members.first();
+ if (!member) return await msg.reply('Who do I put in time-out?');
+
+ member.addRole(msg.guild.roles.find('name', 'Timeout'));
+
+ const { RichEmbed } = require('discord.js');
+ try {
+ const embed = new RichEmbed()
+ .setColor(0x00ae86)
+ .setAuthor(member.user.tag, member.user.avatarURL)
+ .setTitle(`Time Out: **${member.user.tag}**`)
+ .setDescription(`*${member.user.tag}* was placed in time-out by *${msg.author.tag}*.`)
+ .addField('Moderator', msg.author.tag)
+ .setTimestamp()
+ .setFooter(`${msg.author.tag} put ${member.user.tag} in time-out.`, msg.author.avatarURL);
+ msg.guild.channels.find('name', 'logs').send({ embed });
+ }
+ catch (err) {
+ console.error(err.stack);
+ }
+ };
+
+ exports.conf = {
+ aliases: [],
+ guildOnly: true,
+ };
+
+ exports.help = {
+ name: 'timeout',
+ description: 'Put a user in time-out',
+ usage: '@user',
+ };
+
+>>>>>>> 4d253ab491041e147e9943d8820ba06f611df2d5
diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js
index b47fa3f..c3d173a 100644
--- a/commands/Moderation/warn.js
+++ b/commands/Moderation/warn.js
@@ -19,7 +19,7 @@
* *************************************/
exports.run = (bot, msg, args) => {
- if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permssion to warn.');
+ if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permission to warn.');
args.shift();
const warnReason = args.join(' ');
const victim = msg.mentions.members.first();
diff --git a/commands/Pokemon/forcedrop.js b/commands/Pokemon/forcedrop.js
index 1c2131f..3421e9b 100644
--- a/commands/Pokemon/forcedrop.js
+++ b/commands/Pokemon/forcedrop.js
@@ -19,7 +19,7 @@
* *************************************/
exports.run = async (bot, msg) => {
- if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permssion to ban members.');
+ if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permission to drop gyms.');
if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!');
if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.');