mirror of
https://github.com/UniverseDevGroup/PokeBot.git
synced 2025-01-22 17:32:00 -05:00
32 lines
892 B
JavaScript
32 lines
892 B
JavaScript
/** **************************************
|
|
*
|
|
* List Warns: Plugin for PokeBot that performs moderation actions.
|
|
* Copyright (C) 2018 TheEdge, jtsshieh, Alee
|
|
*
|
|
* Licensed under the Open Software License version 3.0
|
|
*
|
|
* *************************************/
|
|
|
|
exports.run = async (bot, msg) => {
|
|
const db = require('quick.db');
|
|
const { RichEmbed } = require('discord.js');
|
|
|
|
const warns = await db.fetch(`warns_${msg.guild.id}_${msg.author.id}`);
|
|
if (!warns) return await msg.reply('You don\'t have any warnings in this server.');
|
|
const embed = new RichEmbed()
|
|
.setTitle('Warns');
|
|
for (let i = 0; i < warns.count; i++) {
|
|
embed.addField('Warning #' + i + 1, warns.reasons[i]);
|
|
}
|
|
msg.channel.send({ embed });
|
|
};
|
|
|
|
exports.conf = {
|
|
aliases: [],
|
|
guildOnly: true,
|
|
};
|
|
|
|
exports.help = {
|
|
name: 'lswarns',
|
|
description: 'Shows all the warnings a user has.',
|
|
};
|