Skip to content
GitHub

Changelog for 4.2

Every release, newest first, each on a page of its own with its notes in full. Entries marked Breaking change a working bot; the migration guide says what to do about them.

4.2.0

· 7 minor changes and 3 patch changes

Minor Changes

  • @MeoCord({ messages: { handlers: 'concurrent' } }) runs a message's matched command and its @MessageHandler() listeners together, so a slow or hung command no longer holds back logging, moderation and the other listeners.

  • @Controller({ inheritedRoutes: 'replace' }) makes a handler the class re-decorates answer only the routes the class declares for it, dropping the ones its base classes declare for that method.

  • createMockRawMember() builds the member Discord sends with an interaction from a server the bot isn't in: plain data with roles as role ids and permissions as a bitfield string, as discord.js keeps it.

  • customId patterns take two new param types: {id:snowflake} and {id:uuid}.

  • MeoCordFactory.create() and a testing module's compile() report every startup error their checks find, not only the first.

  • useStrictMocks(), called once in a test setup file, has every mock from meocord/testing compute the values discord.js computes, where it reads a truthy placeholder otherwise.

  • useMockFn(vi.fn), called once in a test setup file, makes every mock from meocord/testing with the test runner's own mock function.

Patch Changes

  • testCooldownStore no longer fails a correct store on a slow CI runner.

  • Component customId patterns now rank segment by segment, left to right, the way most routers rank paths.

  • A new app from meocord create turns on strict mocks in its vitest.setup.ts, with useStrictMocks(), so its mocks compute what discord.js computes, such as a message's editable or a member's kickable, rather than placeholders.

The 4.2.0 notes in full