File size: 933 Bytes
3c7e34b 5fb7488 3c7e34b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | const { createEmbed } = require('../utils/embeds');
const { Colors } = require('../config');
const { stmts } = require('../database');
module.exports = {
name: 'ticket stats',
async execute(client, message) {
const stats = await stmts.ticketStats();
const embed = createEmbed({
title: 'π« Ticket Statistics',
description: '> Overview of all support tickets',
color: Colors.PRIMARY,
fields: [
{ name: 'π Total', value: `\`${stats.total || 0}\``, inline: true },
{ name: 'π’ Open', value: `\`${stats.open_count || 0}\``, inline: true },
{ name: 'π΄ Closed', value: `\`${stats.closed_count || 0}\``, inline: true },
{ name: 'ποΈ Deleted', value: `\`${stats.deleted_count || 0}\``, inline: true },
],
});
await message.reply({ embeds: [embed] });
},
};
|