wsb-bot / src /commands /ticketStats.js
APRK01
Premium Redesign: System Modules and Surgical Layout
5fb7488
raw
history blame contribute delete
933 Bytes
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] });
},
};