Node.js + Discord.js v14, mathjs expression evaluation, and core event flow.
Runtime: Node.js
Discord API: Discord.js v14
Logic engine: mathjs
mathjs
Every count message is treated as a math expression.
We evaluate with mathjs and compare against the next expected integer.
Why: this enables advanced counting modes with near-zero extra code.
Parse candidate expression from the user message.
Evaluate via mathjs.
Validate anti-cheat + expected sequence.
Persist minimal state for the guild.
Keep this handler lean. Avoid any per-message heavy work.
Last updated 10 minutes ago