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 withrolesas role ids andpermissionsas 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'scompile()report every startup error their checks find, not only the first.useStrictMocks(), called once in a test setup file, has every mock frommeocord/testingcompute 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 frommeocord/testingwith the test runner's own mock function.
Patch Changes
testCooldownStoreno 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 createturns on strict mocks in itsvitest.setup.ts, withuseStrictMocks(), so its mocks compute what discord.js computes, such as a message'seditableor a member'skickable, rather than placeholders.