Skip to content

Feat/nexobot typescript - #232

Open
Robertwlt03 wants to merge 19 commits into
codebymitch:mainfrom
Robertwlt03:feat/nexobot-typescript
Open

Robertwlt03 wants to merge 19 commits into
codebymitch:mainfrom
Robertwlt03:feat/nexobot-typescript

Conversation

@Robertwlt03

Copy link
Copy Markdown

No description provided.

Robertwlt03 and others added 19 commits October 17, 2026 15:59
Rename user-facing branding, colors, package metadata, docs and local
defaults. Support server links now point to GitHub issues. LICENSE keeps
the original copyright line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tsconfig (NodeNext, ES2022, allowJs for the incremental migration)
- build/start/dev/typecheck npm scripts; maintenance scripts run from dist/scripts
- loaders accept .ts and .js modules
- read package.json at runtime instead of importing it outside rootDir
- multi-stage Dockerfile, CI builds before running scripts
- drop root index.js

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…peScript

Adds shared types (src/types), central zod env validation (config/env.ts)
and a typed key-value store API. Runtime behaviour unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p to TypeScript

Completes the migration: no .js files left in src, allowJs removed,
strict mode without any. Slash command payloads and loaded handlers are
identical to the JS version.

Behaviour-relevant fixes found during conversion:
- calculate modal used non-existent fields.first() and always failed
- help: missing logger import on an error path
- economy dashboard: currency name regexes never matched bot config;
  config path works for both tsx (src) and dist

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Old command implementations move to <Category>/modules and are wrapped
by router commands (createRouterCommand) built from their own builders,
so options and behaviour stay unchanged.

A single legacy map (config/commands/legacyCommandMap.ts) drives:
- access checks: stored disabledCommands keys with old names and old
  categories still apply (no data migration)
- prefix routing and aliases (!bal -> /eco balance)
- per-old-command cooldown buckets, abuse protection and error subtypes
- help hints and docs/COMMAND_MIGRATION.md

Prefix parser now supports commands that mix subcommands and groups and
prefers exact subcommand names over aliases. Routes keep stricter
permissions and guild-only flags of the old commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Embeds, replies, error messages, command/option descriptions, choice
names, buttons, modals and config defaults are German (informal du).
Command names, option names, choice values, customIds, DB keys and
stored status values are unchanged. Logs stay English.

Comparisons against displayed strings (ticket embeds, panel fields,
error/footer classification) accept the old English texts as well, so
messages posted before the deploy keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…opment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The currency dashboard wrote modal input verbatim into the bot config
source. Any ManageGuild member could break the file (a single ") or
inject code that runs on the next start, and changed the currency for
all guilds. Changing the currency now requires a bot owner, rejects
quotes/backslashes/line breaks and writes JSON-quoted literals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Old keys like usernotes/autoverify/shop-config translate to group paths
(msg notes, ...) that were not in the command registry: /commands could
neither disable them by old name nor re-enable them, so such commands
stayed disabled forever. The registry now lists subcommand groups and
/commands disable|enable accept current and pre-consolidation names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stored bare key for a name that exists before and after the
consolidation now means the mapped subcommand (ban -> ban user, welcome
-> welcome message) instead of the whole new command, so servers do not
silently lose /ban remove, /welcome autorole and similar. Disabling a
whole new command with such a name is stored as "<name> *".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Templates saved before the German template list (e.g. "{username}'s Room")
had no matching option, so the dashboard showed nothing preselected and
saving forced a different template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d module

Replaces the hand-maintained block list (eco shop, music play/queue,
msg embed) with the old command's own slashOnly flag via resolveRoute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removes formatLegacyTarget, getLegacyNamesFor and the one-caller
getLegacyTarget, the duplicate normalized category label map, and the
never-called reloadCommand loader export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This is a personal bot, not a project taking contributions or security
reports. The README now states up front that NexoBot is based on and
reworks TitanBot by codebymitch (MIT).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Header: transparent banner in the profile picture style (white Nexo
robot with orbit ring next to a slanted plate), with a context badge on
the command migration doc. Footer: a slim divider with the small robot
and the license and TitanBot credit as text, replacing the README's
license section; clickable links sit below it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A small icon set in the banner style (galaxy tile, purple-cyan edge,
white line icon) in front of each heading; heading text and anchors stay
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant