From e4696e0420d4eec93f84097c608c329f5bc63013 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 13 Sep 2024 11:06:48 -0400 Subject: [PATCH] Fix Periodic Table --- commands/search/periodic-table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/search/periodic-table.js b/commands/search/periodic-table.js index ecd52f54..c39a25cc 100644 --- a/commands/search/periodic-table.js +++ b/commands/search/periodic-table.js @@ -88,10 +88,10 @@ module.exports = class PeriodicTableCommand extends Command { } ctx.fillStyle = 'black'; ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(45); - ctx.fillText(element.number, 250, 100); + ctx.fillText(element.number.toString(), 250, 100); ctx.fillText(element.name, 250, 450); ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(30); - ctx.fillText(element.atomic_mass || '?', 250, 400); + ctx.fillText(element.atomic_mass ? element.atomic_mass.toString() : '?', 250, 400); const period = element.number === 0 ? element.period : `period ${element.period}`; const phase = element.undiscovered ? `hypothetical ${element.phase || 'element'}` : element.phase; return msg.say(