From 6e7b0c1e3d094797e64b4381de01d3305d298441 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 7 Feb 2018 14:51:18 +0000 Subject: [PATCH] Period --- commands/search/periodic-table.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/search/periodic-table.js b/commands/search/periodic-table.js index 96fa1751..04dad752 100644 --- a/commands/search/periodic-table.js +++ b/commands/search/periodic-table.js @@ -64,8 +64,9 @@ module.exports = class PeriodicTableCommand extends Command { ctx.fillText(element.name, 250, 450); ctx.font = '30px Noto'; ctx.fillText(element.mass, 250, 400); + const period = element.number === 0 ? `period ${element.period}` : element.period; return msg.say( - `**${element.name} (${element.symbol})** is a ${element.phase} in period ${element.period}.`, + `**${element.name} (${element.symbol})** is a ${element.phase} in ${period}.`, { files: [{ attachment: canvas.toBuffer(), name: `${element.name}.png` }] } ); }