mirror of
https://github.com/UniverseDevGroup/PokeBot.git
synced 2025-01-22 17:32:00 -05:00
testing
This commit is contained in:
parent
1e46326ed2
commit
a5d68950de
2 changed files with 4 additions and 3 deletions
|
@ -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.');
|
||||
}
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ exports.run = async (bot, msg) => {
|
|||
msg.reply('There is no owner for this gym. Claim it now with p:claim!');
|
||||
}
|
||||
else {
|
||||
const owner = msg.channel.topic.slice(15).substring(msg.author.tag.length - 1);
|
||||
const owner = msg.channel.topic.slice(15).substring(19);
|
||||
if (msg.author.id != owner) {
|
||||
return msg.reply('You are not the owner of this gym.');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue