aboutsummaryrefslogtreecommitdiff
path: root/commands/Pokemon/lsitem.js
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-03-24 17:31:54 -0400
committerUnknown <jtsshieh@outlook.com>2018-03-24 17:31:54 -0400
commit1332b3bfc7e711195e6c1202b5ba64aefd78c5db (patch)
tree074f03966a806d9a99bd62ea822f59241703305d /commands/Pokemon/lsitem.js
parent85908fb69c371b46ccef1721107e77a98c705452 (diff)
downloadPokeBot-1332b3bfc7e711195e6c1202b5ba64aefd78c5db.tar.gz
PokeBot-1332b3bfc7e711195e6c1202b5ba64aefd78c5db.tar.bz2
PokeBot-1332b3bfc7e711195e6c1202b5ba64aefd78c5db.zip
fun
Diffstat (limited to 'commands/Pokemon/lsitem.js')
-rw-r--r--commands/Pokemon/lsitem.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/commands/Pokemon/lsitem.js b/commands/Pokemon/lsitem.js
index e06aa78..e562f86 100644
--- a/commands/Pokemon/lsitem.js
+++ b/commands/Pokemon/lsitem.js
@@ -23,13 +23,19 @@ exports.run = async (bot, msg, args) => {
const { RichEmbed } = require('discord.js');
const data = args.join(' ').split('|');
+ const msgs = await msg.channel.fetchMessages({ limit: 10 });
+ const mess = msgs.first();
+ if (!mess.embeds) return;
+ const id = parseInt(mess.author.name.split(':')[0]);
msg.guild.channels.get('426906377001107477').send(
new RichEmbed()
.setTitle('A new pokemon is up for sale!')
+ .setAuthor('ID: ' + id)
.addField('Starting Price', data[1], true)
.addField('Pokemon', data[0], true)
.addField('Other', data[2], true)
- .addField('Seller:', `<@${msg.author.id}>`));
+ .addField('Seller', `<@${msg.author.id}>`, true)
+ .addField('How to bid', 'DM the seller for the pokemon giving them the id, ' + id));
};
exports.conf = {