mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-25 23:15:38 -05:00
Allow power operator to regex
This commit is contained in:
parent
32d5dc27e0
commit
e188c54b67
@ -7,7 +7,7 @@ import * as math from 'mathjs';// I hate this, but it doesn't provide a default
|
||||
export default class Calculator {
|
||||
static run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
||||
const now = Date.now();
|
||||
const exp = interaction.options.getString('expression', true).replace(/[^-()\d/*+.]/g, '');
|
||||
const exp = interaction.options.getString('expression', true).replace(/[^-()\d/*+.^]/g, '');
|
||||
try {
|
||||
let result:math.EvalFunction;
|
||||
switch (exp) {
|
||||
|
Loading…
Reference in New Issue
Block a user