Bot stack & counting engine

Node.js + Discord.js v14, mathjs expression evaluation, and core event flow.

Stack

  • Runtime: Node.js

  • Discord API: Discord.js v14

  • Logic engine: mathjs

Counting engine (high level)

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.

Expected flow

  1. Parse candidate expression from the user message.

  2. Evaluate via mathjs.

  3. Validate anti-cheat + expected sequence.

  4. Persist minimal state for the guild.

Keep this handler lean. Avoid any per-message heavy work.

Last updated