mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Fix
This commit is contained in:
@@ -28,7 +28,7 @@ module.exports = class MathGameCommand extends Command {
|
||||
|
||||
async run(msg, args) {
|
||||
const { difficulty } = args;
|
||||
const operation = operations[difficulty][Math.floor(Math.random() * operations.length)];
|
||||
const operation = operations[difficulty][Math.floor(Math.random() * operations[difficulty].length)];
|
||||
const value1 = Math.floor(Math.random() * maxValues[difficulty]) + 1;
|
||||
const value2 = Math.floor(Math.random() * maxValues[difficulty]) + 1;
|
||||
const expression = `${value1} ${operation} ${value2}`;
|
||||
|
||||
Reference in New Issue
Block a user