Skip to content

Commit

Permalink
[fix] broken /calc with dependency update
Browse files Browse the repository at this point in the history
  • Loading branch information
retrixe committed Jul 26, 2021
1 parent 1f256f9 commit ec42b8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/bot/commands/games.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Command } from '../imports/types'
import { eval as eva } from 'mathjs'
import { evaluate } from 'mathjs'

// Zalgo characters.
const characters = [
Expand Down Expand Up @@ -179,7 +179,7 @@ More info here: https://mathjs.org/docs/expressions/syntax.html`,
},
generator: (message, args) => {
try {
return `${eva(args.join(' ').split(',').join('.').split('÷').join('/').toLowerCase())}`
return `${evaluate(args.join(' ').split(',').join('.').split('÷').join('/').toLowerCase())}`
} catch (e) {
return { content: 'Invalid expression >_<', error: true }
}
Expand Down

0 comments on commit ec42b8d

Please sign in to comment.