added 𝜋 char support

This commit is contained in:
Ean Milligan (Bastion) 2022-05-05 02:59:57 -04:00
parent 6b2aae8dfb
commit 6a305d1479
2 changed files with 3 additions and 3 deletions

4
mod.ts
View File

@ -5,7 +5,7 @@
*/ */
import config from "./config.ts"; import config from "./config.ts";
import { DEBUG, LOCALMODE } from "./flags.ts"; import { DEBUG, DEVMODE, LOCALMODE } from "./flags.ts";
import { import {
// Discordeno deps // Discordeno deps
startBot, editBotStatus, editBotNickname, startBot, editBotStatus, editBotNickname,
@ -94,7 +94,7 @@ startBot({
log(LT.ERROR, `Failed to send message: ${JSON.stringify(e)}`); 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) => { messageCreate: (message: DiscordenoMessage) => {
// Ignore all other bots // Ignore all other bots
if (message.isBot) return; if (message.isBot) return;

View File

@ -820,7 +820,7 @@ const parseRoll = (fullCmd: string, localPrefix: string, localPostfix: string, m
containsCrit: false, containsCrit: false,
containsFail: 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 // If the operand is the constant pi, create a SolvedStep for it
mathConf[i] = { mathConf[i] = {
total: Math.PI, total: Math.PI,