diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-03-12 21:57:11 -0400 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-03-12 21:57:11 -0400 |
| commit | 0913f19fede8e4e22682a744f8b72d5c6a666d1d (patch) | |
| tree | 6486c997b3481611e7651b477d70e8ce1f853ad4 /commands/Moderation/lswarns.js | |
| parent | 7e013ccbf04aa5c0f07f4d6c1c5c9fa6349c5f87 (diff) | |
| download | PokeBot-0913f19fede8e4e22682a744f8b72d5c6a666d1d.tar.gz PokeBot-0913f19fede8e4e22682a744f8b72d5c6a666d1d.tar.bz2 PokeBot-0913f19fede8e4e22682a744f8b72d5c6a666d1d.zip | |
hopefully not breaking anything :pray:
Diffstat (limited to 'commands/Moderation/lswarns.js')
| -rw-r--r-- | commands/Moderation/lswarns.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/Moderation/lswarns.js b/commands/Moderation/lswarns.js index dea3569..a9bf5d9 100644 --- a/commands/Moderation/lswarns.js +++ b/commands/Moderation/lswarns.js @@ -22,13 +22,12 @@ exports.run = async (bot, msg) => { const db = require('quick.db'); const { RichEmbed } = require('discord.js'); - const warns = await db.fetch(`warns_${msg.author.id}_count`); + const warns = await db.fetch(`warns_${msg.guild.id}_${msg.author.id}`); if (!warns) return await msg.reply('Yay! You have no warns.'); const embed = new RichEmbed() .setTitle('Warns'); - for (let i = 1; i <= warns; i++) { - const warning = await db.fetch(`warns_${msg.author.id}_warn_${i}`); - embed.addField('Warning #' + i, warning); + for (let i = 0; i < warns.count; i++) { + embed.addField('Warning #' + i, warns.reasons[i]); } msg.channel.send({ embed }); }; |
