From 6a305d14792ecee7864ca7beb296f6f1211bbbbf Mon Sep 17 00:00:00 2001 From: "Ean Milligan (Bastion)" Date: Thu, 5 May 2022 02:59:57 -0400 Subject: [PATCH] =?UTF-8?q?added=20=F0=9D=9C=8B=20char=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mod.ts | 4 ++-- src/solver.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mod.ts b/mod.ts index 7c55cf6..829acda 100644 --- a/mod.ts +++ b/mod.ts @@ -5,7 +5,7 @@ */ import config from "./config.ts"; -import { DEBUG, LOCALMODE } from "./flags.ts"; +import { DEBUG, DEVMODE, LOCALMODE } from "./flags.ts"; import { // Discordeno deps startBot, editBotStatus, editBotNickname, @@ -94,7 +94,7 @@ startBot({ log(LT.ERROR, `Failed to send message: ${JSON.stringify(e)}`); }); }, - debug: dmsg => log(LT.LOG, `Debug Message | ${JSON.stringify(dmsg)}`), + debug: DEVMODE ? dmsg => log(LT.LOG, `Debug Message | ${JSON.stringify(dmsg)}`) : () => {}, messageCreate: (message: DiscordenoMessage) => { // Ignore all other bots if (message.isBot) return; diff --git a/src/solver.ts b/src/solver.ts index 513e2ef..8380ba1 100644 --- a/src/solver.ts +++ b/src/solver.ts @@ -820,7 +820,7 @@ const parseRoll = (fullCmd: string, localPrefix: string, localPostfix: string, m containsCrit: false, containsFail: false }; - } else if (mathConf[i].toString().toLowerCase() === "pi") { + } else if (mathConf[i].toString().toLowerCase() === "pi" || mathConf[i].toString().toLowerCase() == "𝜋") { // If the operand is the constant pi, create a SolvedStep for it mathConf[i] = { total: Math.PI,