aboutsummaryrefslogtreecommitdiff
path: root/commands/Pokemon/claim.js
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-02-24 21:35:12 -0500
committerUnknown <jtsshieh@outlook.com>2018-02-24 21:35:12 -0500
commita5d68950de72f8dd3d7737d97b41c2b13b76e0e9 (patch)
tree54fc8d89d6408fce4609e778e4793d65c6d41bdd /commands/Pokemon/claim.js
parent1e46326ed2dd69b2df19c4ff7a83b329ad1d8187 (diff)
downloadPokeBot-a5d68950de72f8dd3d7737d97b41c2b13b76e0e9.tar.gz
PokeBot-a5d68950de72f8dd3d7737d97b41c2b13b76e0e9.tar.bz2
PokeBot-a5d68950de72f8dd3d7737d97b41c2b13b76e0e9.zip
testing
Diffstat (limited to 'commands/Pokemon/claim.js')
-rw-r--r--commands/Pokemon/claim.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/commands/Pokemon/claim.js b/commands/Pokemon/claim.js
index aa891ef..d35b5d2 100644
--- a/commands/Pokemon/claim.js
+++ b/commands/Pokemon/claim.js
@@ -2,10 +2,11 @@ exports.run = async (bot, msg) => {
if (!msg.channel.topic.startsWith('Current Owner:')) return msg.reply('Go into one of the gym channels and try again.');
if (msg.channel.topic == 'Current Owner: *none*') {
msg.reply('Alright, you have claimed this gym as yours! Be ready to battle anyone who approaches you');
- msg.channel.setTopic('Current Owner: ' + msg.author.tag + '/' + msg.author.id);
+ msg.channel.setTopic('Current Owner: ' + msg.author.id + '/' + msg.author.tag);
}
else {
- const owner = msg.channel.topic.slice(15).substring(msg.author.tag.length - 1);
+
+ const owner = msg.channel.topic.slice(15).substring(19);
msg.channel.send('<@' + owner + '>, come here as ' + msg.member.displayName + ' wants to battle you.');
}
};