From f0b5e004e0a0556fbd0c7b0465936f5f6c2740e8 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 3 May 2021 17:18:18 -0400 Subject: [PATCH] Lock down more in math --- commands/edit-number/math.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/commands/edit-number/math.js b/commands/edit-number/math.js index 08e62523..27b78fa3 100644 --- a/commands/edit-number/math.js +++ b/commands/edit-number/math.js @@ -1,6 +1,14 @@ const Command = require('../../structures/Command'); const core = require('mathjs/number'); const math = core.create(core.all); +math.import({ + import: function () { throw new Error('Function import is disabled') }, + createUnit: function () { throw new Error('Function createUnit is disabled') }, + evaluate: function () { throw new Error('Function evaluate is disabled') }, + parse: function () { throw new Error('Function parse is disabled') }, + simplify: function () { throw new Error('Function simplify is disabled') }, + derivative: function () { throw new Error('Function derivative is disabled') } + }, { override: true }); module.exports = class MathCommand extends Command { constructor(client) {