From 33b300f2b37d84045f3dc27a80fa58acc6608087 Mon Sep 17 00:00:00 2001 From: Oliver Cordingley Date: Tue, 19 Jan 2021 17:20:49 +0000 Subject: [PATCH] closeall logs use already-defined plural method --- src/commands/closeall.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/closeall.js b/src/commands/closeall.js index f6fe8b8..cf27633 100644 --- a/src/commands/closeall.js +++ b/src/commands/closeall.js @@ -12,6 +12,7 @@ const fs = require('fs'); const { join } = require('path'); const config = require(join(__dirname, '../../user/', require('../').config)); const archive = require('../modules/archive'); +const { plural } = require('../modules/utils'); // A slight modification to the 'close' command to allow multiple tickets to be closed at once @@ -207,7 +208,7 @@ module.exports = { let embed = new MessageEmbed() .setColor(config.colour) .setAuthor(message.author.username, message.author.displayAvatarURL()) - .setTitle(`${tickets.count} ticket${tickets.count > 1 ? 's' : ''} closed (${config.prefix}closeall)`) + .setTitle(`${tickets.count} ${plural('ticket', tickets.count)} closed (${config.prefix}closeall)`) .addField('Closed by', message.author, true) .setFooter(guild.name, guild.iconURL()) .setTimestamp();