From 2b83e842fea1c9cab7abbe45154a1f140e26f990 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 25 Feb 2018 21:58:31 -0500 Subject: Basic music commands --- commands/Pokemon/claim.js | 2 +- commands/Pokemon/drop.js | 2 +- commands/Pokemon/join.js | 2 +- commands/Pokemon/leave.js | 2 +- commands/Pokemon/tradegym.js | 69 ++++++++++++++++++++++---------------------- 5 files changed, 38 insertions(+), 39 deletions(-) (limited to 'commands/Pokemon') diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js index 228e1c9..f9e71ee 100644 --- a/commands/Pokemon/claim.js +++ b/commands/Pokemon/claim.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Claim: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/drop.js b/commands/Pokemon/drop.js index 6adf3d4..6b10ace 100644 --- a/commands/Pokemon/drop.js +++ b/commands/Pokemon/drop.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Drop: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/join.js b/commands/Pokemon/join.js index c87e52d..01af694 100644 --- a/commands/Pokemon/join.js +++ b/commands/Pokemon/join.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Join: Plugin for PokeBot that powers the PokeWorld team system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/leave.js b/commands/Pokemon/leave.js index bd78a43..d2ca96c 100644 --- a/commands/Pokemon/leave.js +++ b/commands/Pokemon/leave.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * Leave: Plugin for PokeBot that powers the PokeWorld team system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee diff --git a/commands/Pokemon/tradegym.js b/commands/Pokemon/tradegym.js index 17ca6f4..f10e3fa 100644 --- a/commands/Pokemon/tradegym.js +++ b/commands/Pokemon/tradegym.js @@ -1,4 +1,4 @@ -/**************************************** +/** ************************************** * * TradeGym: Plugin for PokeBot that powers the PokeWorld gym system. * Copyright (C) 2018 TheEdge, jtsshieh, Alee @@ -18,37 +18,36 @@ * * *************************************/ -exports.run = async (bot, msg, args) => { - - if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); - let team; - if (msg.member.roles.find('name', 'Aqua')) team = 'Aqua'; - if (msg.member.roles.find('name', 'Rocket')) team = 'Rocket'; - if (msg.member.roles.find('name', 'Magma')) team = 'Magma'; - if (msg.channel.topic == 'Current Owner: ' + msg.author.id + '/' + msg.author.tag + '/' + team) { - if (!msg.mentions.members.first()) return msg.reply('Sorry, you have to ping the recipient of the gym!'); - const recipient = msg.mentions.members.first(); - - msg.reply('Trading gym to ' + recipient); - let recipientTeam; - if (recipient.roles.find('name', 'Aqua')) recipientTeam = 'Aqua'; - if (recipient.roles.find('name', 'Rocket')) recipientTeam = 'Rocket'; - if (recipient.roles.find('name', 'Magma')) recipientTeam = 'Magma'; - msg.channel.setTopic('Current Owner: ' + recipient.id + '/' + recipient.user.tag + '/' + recipientTeam); - } - else { - msg.reply('You have to own the gym to be able to trade it!'); - }; - }; - - exports.conf = { - aliases: [], - guildOnly: true, - }; - - exports.help = { - name: 'tradegym', - description: 'Trade a gym to the pinged member.', - usage: '@user', - }; - \ No newline at end of file +exports.run = async (bot, msg) => { + + if (!msg.channel.name.startsWith('gym-')) return msg.reply('Go into one of the gym channels and try again.'); + let team; + if (msg.member.roles.find('name', 'Aqua')) team = 'Aqua'; + if (msg.member.roles.find('name', 'Rocket')) team = 'Rocket'; + if (msg.member.roles.find('name', 'Magma')) team = 'Magma'; + if (msg.channel.topic == 'Current Owner: ' + msg.author.id + '/' + msg.author.tag + '/' + team) { + if (!msg.mentions.members.first()) return msg.reply('Sorry, you have to ping the recipient of the gym!'); + const recipient = msg.mentions.members.first(); + + msg.reply('Trading gym to ' + recipient); + let recipientTeam; + if (recipient.roles.find('name', 'Aqua')) recipientTeam = 'Aqua'; + if (recipient.roles.find('name', 'Rocket')) recipientTeam = 'Rocket'; + if (recipient.roles.find('name', 'Magma')) recipientTeam = 'Magma'; + msg.channel.setTopic('Current Owner: ' + recipient.id + '/' + recipient.user.tag + '/' + recipientTeam); + } + else { + msg.reply('You have to own the gym to be able to trade it!'); + } +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'tradegym', + description: 'Trade a gym to the pinged member.', + usage: '@user', +}; -- cgit v1.2.3