meocord 4.1.0-beta.5 → 4.1.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/README.md +58 -3169
- package/dist/cjs/_shared/{explained-error-0T4WID-9.cjs → explained-error-CtgL_q_6.cjs} +34 -16
- package/dist/cjs/_shared/{providers-B_SmxbXl.cjs → providers-BXnrmm9p.cjs} +207 -119
- package/dist/cjs/_shared/{shard-context-D0rpUQZL.cjs → shard-context-BmA9OoaF.cjs} +710 -190
- package/dist/cjs/_shared/{theme-resolvers-CIHGYuRP.cjs → theme-resolvers-DhoRhqJV.cjs} +961 -233
- package/dist/cjs/_shared/translate-error-CNY8ic6A.cjs +315 -0
- package/dist/cjs/common/index.cjs +314 -51
- package/dist/cjs/core/index.cjs +116 -19
- package/dist/cjs/decorator/index.cjs +345 -206
- package/dist/cjs/enum/index.cjs +40 -13
- package/dist/cjs/testing/index.cjs +582 -226
- package/dist/esm/bin/app-template/README.md.template +1 -1
- package/dist/esm/bin/app-template/src/controllers/context-menu/sample.context-menu.controller.ts.template +2 -2
- package/dist/esm/bin/builder-template/builder/context-menu.builder.template +1 -1
- package/dist/esm/bin/builder-template/controller/context-menu.controller.template +2 -2
- package/dist/esm/bin/generator.js +15 -8
- package/dist/esm/bin/helper/controller-generator.helper.js +25 -14
- package/dist/esm/bin/helper/filter-generator.helper.js +2 -4
- package/dist/esm/bin/helper/guard-generator.helper.js +2 -4
- package/dist/esm/bin/helper/interceptor-generator.helper.js +2 -4
- package/dist/esm/bin/helper/observer-generator.helper.js +2 -4
- package/dist/esm/bin/helper/pipe-generator.helper.js +2 -4
- package/dist/esm/bin/helper/service-generator.helper.js +2 -4
- package/dist/esm/bin/meocord.js +55 -14
- package/dist/esm/common/cooldown-store.js +48 -13
- package/dist/esm/common/decorator.js +27 -20
- package/dist/esm/common/errors.js +168 -43
- package/dist/esm/common/execution-context.js +19 -11
- package/dist/esm/common/explained-error.js +15 -4
- package/dist/esm/common/factory-provider.js +17 -13
- package/dist/esm/common/index.js +1 -0
- package/dist/esm/common/logger.js +32 -8
- package/dist/esm/common/meocord-messages.js +68 -0
- package/dist/esm/common/meocord-text.js +85 -0
- package/dist/esm/common/metadata.js +21 -16
- package/dist/esm/common/redis-cooldown-store.js +26 -16
- package/dist/esm/common/response/install-context.js +15 -7
- package/dist/esm/common/response/presenter.js +12 -8
- package/dist/esm/common/response/response-state.js +58 -50
- package/dist/esm/common/route.js +34 -16
- package/dist/esm/common/sharded-cooldown-store.js +18 -11
- package/dist/esm/common/theme.js +9 -0
- package/dist/esm/common/token.js +19 -10
- package/dist/esm/common/translate-error.js +67 -0
- package/dist/esm/common/translator.js +46 -36
- package/dist/esm/core/component-routes.js +33 -6
- package/dist/esm/core/dispatcher.js +103 -8
- package/dist/esm/core/event-requirements.js +19 -2
- package/dist/esm/core/fallback.js +11 -6
- package/dist/esm/core/handler-input.js +45 -31
- package/dist/esm/core/handler-pipeline.js +6 -3
- package/dist/esm/core/handler-registry.js +59 -17
- package/dist/esm/core/meocord-factory.js +33 -5
- package/dist/esm/core/meocord.app.js +18 -7
- package/dist/esm/core/message-help.js +267 -0
- package/dist/esm/core/message-params.js +170 -95
- package/dist/esm/core/message-routes.js +101 -18
- package/dist/esm/core/route-specificity.js +4 -3
- package/dist/esm/core/scalar-types.js +45 -0
- package/dist/esm/core/shard-context.js +12 -12
- package/dist/esm/core/shard-manager.js +16 -8
- package/dist/esm/core/theme-resolvers.js +13 -7
- package/dist/esm/core/theme-scope.js +31 -19
- package/dist/esm/decorator/app.decorator.js +47 -22
- package/dist/esm/decorator/command-builder.decorator.js +16 -11
- package/dist/esm/decorator/controller-class.decorator.js +21 -19
- package/dist/esm/decorator/controller.decorator.js +146 -53
- package/dist/esm/decorator/defer.decorator.js +23 -24
- package/dist/esm/decorator/event.decorator.js +29 -17
- package/dist/esm/decorator/filter.decorator.js +44 -26
- package/dist/esm/decorator/guard.decorator.js +42 -19
- package/dist/esm/decorator/inject.decorator.js +13 -5
- package/dist/esm/decorator/interceptor.decorator.js +43 -31
- package/dist/esm/decorator/observer.decorator.js +19 -17
- package/dist/esm/decorator/service.decorator.js +18 -5
- package/dist/esm/decorator/theme.decorator.js +14 -7
- package/dist/esm/decorator/validation.decorator.js +60 -29
- package/dist/esm/enum/controller.enum.js +38 -10
- package/dist/esm/enum/metadata-key.enum.js +2 -3
- package/dist/esm/package.json.js +1 -1
- package/dist/esm/testing/catalog.js +36 -9
- package/dist/esm/testing/cooldown-store-suite.js +16 -13
- package/dist/esm/testing/execution-context.js +21 -6
- package/dist/esm/testing/inspect-handler.js +24 -11
- package/dist/esm/testing/meocord-testing-module.js +107 -25
- package/dist/esm/testing/mock-fn.js +65 -18
- package/dist/esm/testing/mock-interaction.js +165 -79
- package/dist/esm/testing/modal-fields.js +23 -10
- package/dist/esm/testing/response.js +41 -14
- package/dist/esm/testing/routing.js +53 -20
- package/dist/esm/testing/theme.js +27 -13
- package/dist/esm/util/dev-runner.util.js +40 -0
- package/dist/esm/util/generator-cli.util.js +2 -4
- package/dist/esm/util/interaction.util.js +9 -1
- package/dist/types/common/index.d.cts +260 -99
- package/dist/types/common/index.d.ts +260 -99
- package/dist/types/controller.enum-HOQhQPQ4.d.cts +66 -0
- package/dist/types/controller.enum-HOQhQPQ4.d.ts +66 -0
- package/dist/types/cooldown-store-BwDedkQk.d.cts +154 -0
- package/dist/types/cooldown-store-BwDedkQk.d.ts +154 -0
- package/dist/types/core/index.d.cts +175 -39
- package/dist/types/core/index.d.ts +175 -39
- package/dist/types/decorator/index.d.cts +614 -375
- package/dist/types/decorator/index.d.ts +614 -375
- package/dist/types/enum/index.d.cts +3 -4
- package/dist/types/enum/index.d.ts +3 -4
- package/dist/types/index-Bi_mYodF.d.cts +2682 -0
- package/dist/types/index-oSZz7ale.d.ts +2682 -0
- package/dist/types/interface/index.d.cts +4 -997
- package/dist/types/interface/index.d.ts +4 -997
- package/dist/types/route-DIqsQIDN.d.cts +102 -0
- package/dist/types/route-DIqsQIDN.d.ts +102 -0
- package/dist/types/testing/index.d.cts +825 -267
- package/dist/types/testing/index.d.ts +825 -267
- package/dist/types/{theme-resolvers-BUx8CQ0J.d.cts → theme-resolvers-EMIDH5y5.d.cts} +13 -7
- package/dist/types/{theme-resolvers-BUx8CQ0J.d.ts → theme-resolvers-EMIDH5y5.d.ts} +13 -7
- package/dist/types/translator-CN8tHTRV.d.cts +250 -0
- package/dist/types/translator-geIgJfsS.d.ts +250 -0
- package/meocord.eslint.cjs +3 -0
- package/meocord.eslint.d.cts +16 -4
- package/meocord.eslint.d.ts +31 -3
- package/meocord.eslint.mjs +3 -0
- package/package.json +7 -4
- package/dist/cjs/_shared/translator-CJtgDLJE.cjs +0 -631
- package/dist/types/controller.enum-BL6wEQls.d.cts +0 -32
- package/dist/types/controller.enum-BL6wEQls.d.ts +0 -32
- package/dist/types/errors-Dnx0meLj.d.cts +0 -836
- package/dist/types/errors-Dnx0meLj.d.ts +0 -836
- package/dist/types/route-BdFkN6G8.d.cts +0 -51
- package/dist/types/route-BdFkN6G8.d.ts +0 -51
- package/dist/types/translator-BC58l9jj.d.cts +0 -290
- package/dist/types/translator-BC58l9jj.d.ts +0 -290
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# meocord
|
|
2
2
|
|
|
3
|
+
## 4.1.0-beta.6
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#228](https://github.com/meocord/meocord/pull/228) [`8e1b936`](https://github.com/meocord/meocord/commit/8e1b9368772588f2a5a3269dd2aff8da1a9878c1) Thanks [@l7aromeo](https://github.com/l7aromeo)! - `@MeoCord({ messages: { mention: 'only' } })` starts every message command in a server with a mention of the bot and nothing else, neither a prefix nor the message as plain text, while a direct message starts as usual, after the prefix or as it is; `@MessageHandler(pattern, { mention: 'only' })` does the same for one command beside the app's prefix. Discord sends a message's text without the privileged MessageContent intent when the message mentions the bot, and in direct messages, so such commands, and commands with `scope: 'dm'`, no longer need it: MeoCord's startup warning about MessageContent names only a `@MessageHandler()` listener and commands a prefix or plain text starts in a server, and says what still arrives without it. A mention-only bot can run without the intent, and without applying for it once verified. In a test, `resolveRoute(App, { content, dm: true })` reads a message as a direct message.
|
|
8
|
+
|
|
9
|
+
- [#252](https://github.com/meocord/meocord/pull/252) [`2d0575f`](https://github.com/meocord/meocord/commit/2d0575faba17cc4d458a6da20bb189dfa9506942) Thanks [@l7aromeo](https://github.com/l7aromeo)! - MeoCord's own texts for users go through the app's translator: a message command's usage and each thing wrong with it, the built-in `!help` and the labels of `HandlerRegistry.messageHelp`, cooldown and cooldown store refusals, "Command not found!", the generic error, and the default presenter's "Working on it…" and "Oops!". Add a `meocord` group to any catalog given to `@MeoCord({ i18n })`, all of it or part, such as `meocord: { usage: { heading: 'Cara pakai: {usage}' } }`; a text a locale leaves out stays in English, line by line. Answers to an interaction are in the user's language, replies to a message in the server's preferred language, or the default locale's in a DM. MeoCord's English stands as the English catalog, so an English-speaking user or server gets it even under a default locale in another language, unless the app's own `en-US` or `en-GB` catalog words the text. The keys and their English are in the new `MeoCordMessages` type from `meocord/interface`, and a key MeoCord lacks, or a `{param}` its English text lacks, fails to compile. Without `i18n`, every text is the English one it is today.
|
|
10
|
+
|
|
11
|
+
- `translateError(error, t, target)` from `meocord/common` returns the text the fallback answers an error with, in the language of an interaction, a message or a locale, for an exception filter that answers MeoCord's errors its own way.
|
|
12
|
+
- A message param type takes `labelKey`, a message key of the app's catalog, for a label in each server's language. `@MeoCord` refuses one without `i18n`, or one the default catalog has no message for.
|
|
13
|
+
- `expectCompleteCatalog(t, { meocord: true })` requires every locale that is not English to translate each of MeoCord's texts. Without the option it reports only a `meocord` key MeoCord lacks.
|
|
14
|
+
|
|
15
|
+
See [Localisation](https://meocord.dev/docs/4.1/localisation).
|
|
16
|
+
|
|
17
|
+
- [#251](https://github.com/meocord/meocord/pull/251) [`b4a9e58`](https://github.com/meocord/meocord/commit/b4a9e5841427c47322621be289e0d0ca8c1b0ee2) Thanks [@l7aromeo](https://github.com/l7aromeo)! - Message commands have a built-in help command, off unless asked for: `@MeoCord({ messages: { prefix: '!', help: true } })` answers `!help` with the commands the caller can use where they asked, one line each with its handler's `description`, and `!help <command>` with one command's usage, params, aliases and where it works. `help: { command, aliases }` names other words. The list leaves out a handler with a guard on its method or controller, since it runs no guards, and one whose new `hidden: true` option asks to be left out; named, either is shown. `!help` for words with no handler of their own lists their subcommands, and an unknown name or nothing to list gets a line saying so. It answers only after a prefix or mention, and an app's own `help` handler always runs instead, with a warning at startup. With `replyEmoji` the reply begins with the theme's `emojis.info`.
|
|
18
|
+
|
|
19
|
+
The reply follows the app's translations, `meocord.help.*` in its catalog with `@MeoCord({ i18n })`, in the server's language, and is English otherwise; see [MeoCord's own texts](https://meocord.dev/docs/4.1/localisation). A presenter's new optional `messageHelp(help, message)` method writes it instead, from `MessageHelp`, what the built-in found. `HandlerRegistry.messageHelp(message, query?)` gives the same model to a help command of the app's own, with help on or off, and `MessageHandlerEntry.hidden` says whether a handler asked to be left out. `hidden` also leaves a subcommand out of the usage listing a message naming only a parent gets.
|
|
20
|
+
|
|
21
|
+
- [#246](https://github.com/meocord/meocord/pull/246) [`6c46b07`](https://github.com/meocord/meocord/commit/6c46b07b19dff7fde4614e7d80e0ff3e4ddfe8d0) Thanks [@l7aromeo](https://github.com/l7aromeo)! - A message that names only a command's leading words, such as `!config` when `config set …` and `config get …` exist, or an unknown subcommand, such as `!config reset`, gets the usage of each subcommand in reply, under a `Usage:` heading, one line per handler by its own pattern, where it got no reply. A handler whose pattern matches the message still runs, so a `config` or `config {key}` handler takes it as before. A subcommand with a guard, on its method or its controller, inherited ones included, is left out of the listing on purpose, since the listing runs no guards and must not name what a caller may be refused; it still answers its own usage when named, and a parent with nothing left to list gets no reply. App-wide guards do not filter the listing, as they do not filter a usage reply. The reply is a `MessageUsageError`, answered through the app's global filters and then the fallback, like any usage reply.
|
|
22
|
+
|
|
23
|
+
- [#231](https://github.com/meocord/meocord/pull/231) [`8395b05`](https://github.com/meocord/meocord/commit/8395b056427c22caaf65afc16522ffc0d2b336aa) Thanks [@l7aromeo](https://github.com/l7aromeo)! - A button's, select menu's or modal's customId pattern can type a param, `{name:type}`, with `int`, `number`, `bool` or words to choose from such as `{order:asc|desc}`, read by the parsers message commands use. The handler receives the value, such as a number for `@Command('counter/{count:int}', CommandType.BUTTON)`, and its params are checked against the pattern when the code compiles; `route(pattern).build()` takes values of those types. A segment that is not a value of its type matches no route. Such a pattern used to be read as literal text, so it silently never matched; a type a customId cannot hold, such as `{target:member}`, now stops the bot where it is declared. Beside a text param in the same place, a typed one is tried first, and of two types the narrower (words to choose from, then `bool`, `int`, `number`), whatever order they are declared in; and patterns whose typed segments take no value in common are different routes. For a route with a typed param, `resolveRoute` adds `values`, the params as the handler receives them, beside `params`, which stays their text; every other result is as it was. From `meocord/common`, `RouteValues<Pattern>` now gives each typed param the value of its type, such as `number` for `{count:int}`, and an untyped param takes any `RouteValue`, a string, number or bigint, as before; `RouteParams<Pattern>` names each param without its type.
|
|
24
|
+
|
|
25
|
+
- [#239](https://github.com/meocord/meocord/pull/239) [`a5868f4`](https://github.com/meocord/meocord/commit/a5868f4feb33197c0d88a4254f8ab50c28b7f690) Thanks [@l7aromeo](https://github.com/l7aromeo)! - A context menu handler can declare the kind of interaction its builder registers: `UserContextMenuCommandInteraction` for a builder that calls `setType(ApplicationCommandType.User)`, or `MessageContextMenuCommandInteraction` for `Message`. It had to take the union of both, since declaring one failed to compile with "Unable to resolve signature of method decorator". The union still works. A builder's kind is a value TypeScript cannot read, so the bot checks it as it starts: a handler that declares the other kind stops it, naming both.
|
|
26
|
+
|
|
27
|
+
`meocord g co context-menu <name>` generates a user context menu command with its handler typed to match, and `--message` generates a message one. The context menu controller in a new project is typed the same way.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [#229](https://github.com/meocord/meocord/pull/229) [`551c0eb`](https://github.com/meocord/meocord/commit/551c0ebc6c1f6a544702ade824c1410007449c5c) Thanks [@l7aromeo](https://github.com/l7aromeo)! - A user context menu command and a message context menu command with the same name, which Discord allows, each reach their own `@Command` handler. The first handler declared under the name took both, so a message command could run the user command's handler. `TestingModule.invoke` refuses the other kind's interaction the same way, naming both kinds.
|
|
32
|
+
|
|
33
|
+
- [#243](https://github.com/meocord/meocord/pull/243) [`68638ab`](https://github.com/meocord/meocord/commit/68638abbe22544542808ae68332ce089a6c238bc) Thanks [@l7aromeo](https://github.com/l7aromeo)! - `meocord start --dev` exits 1 when the bot cannot log in, as `meocord start --prod` does, instead of watching on with the bot offline: a missing or refused token, refused intents, or Discord being unreachable is not something a code change fixes. It says so in one line, after the reason the bot gave. After any other exit, such as an error at startup or a crash once online, it keeps watching and says `The application exited with code N; waiting for changes.`, then starts the bot again on the next rebuild. With `sharding`, the shard manager ends the session the same way.
|
|
34
|
+
|
|
35
|
+
- [#249](https://github.com/meocord/meocord/pull/249) [`4af6d70`](https://github.com/meocord/meocord/commit/4af6d70fb37bbc5fc2a8f28778156beeda3d00ee) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The package's homepage is https://meocord.dev, the documentation site, where npm links it, and a new application's README links MeoCord there.
|
|
36
|
+
|
|
37
|
+
- [#240](https://github.com/meocord/meocord/pull/240) [`b462777`](https://github.com/meocord/meocord/commit/b462777be7fa16d17113d061f9e7e815725ca230) Thanks [@l7aromeo](https://github.com/l7aromeo)! - `module.invoke()` checks an interaction's customId against every handler of the testing module, ranked as dispatch ranks them, as it already did for a message. A customId dispatch gives to another handler, such as `card/summary` beside `card/{id}`, rejects naming the handler that runs, where it ran the named handler anyway. A handler declared under two patterns gets the params of the one dispatch picks, typed values included. A testing module whose controllers would stop the bot, such as two whose patterns match the same customIds, now makes `invoke` throw the same startup error with a customId, as `dispatch` already did; give each such controller its own module.
|
|
38
|
+
|
|
39
|
+
- [#244](https://github.com/meocord/meocord/pull/244) [`eef71c7`](https://github.com/meocord/meocord/commit/eef71c79adebc5ee37a9637cc52a8fde38d9111d) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The editor documentation of the application, the config file and the remaining public helpers says what each is for, with examples that compile, and links the guide: `MeoCordFactory`, `MeoCordApplication`, `@MeoCord`, `HandlerRegistry` and its entry types, `ShardContext`, `MeoCordConfig`, `ShardingConfig`, `CommandRegistrationConfig`, `RsbuildConfig`, the providers and `createToken`/`factoryProvider`, `Logger`, `OnReady`/`OnShutdown`, `CommandType`, `DeepPartial`/`DeepReadonly` and the `meocord/eslint` config. `MetadataKey` is marked internal: it holds MeoCord's own reflect keys and is not part of the documented API.
|
|
40
|
+
|
|
41
|
+
- [#226](https://github.com/meocord/meocord/pull/226) [`5c14933`](https://github.com/meocord/meocord/commit/5c1493377b616cfb474cb300144b922f99342f81) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The JSDoc of every decorator in `meocord/decorator`, and of `CooldownOptions`, `DeferOptions` and `CommandBuilderOptions`, is rewritten for the hover in your editor: a one-line summary, when to use it and what to use instead, how it works, where it runs in a call, and an example that compiles against the published types. The options of `@Guard`, `@Interceptor`, `@Observer`, `@Validate`, `@Cooldown` and `@Defer` are documented on each option, with its default.
|
|
42
|
+
|
|
43
|
+
- [#236](https://github.com/meocord/meocord/pull/236) [`01d92f6`](https://github.com/meocord/meocord/commit/01d92f634ecbfe4925f8779ebc64f2363e642043) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The guide links in the JSDoc of the decorators and the pipeline types point to the 4.1 documentation, the version you installed, and to its pages as they are named: slash commands, buttons, selects and modals, and how a call runs.
|
|
44
|
+
|
|
45
|
+
- [#241](https://github.com/meocord/meocord/pull/241) [`51282fe`](https://github.com/meocord/meocord/commit/51282fe4386c3e83013eff5be719cd001e8422b7) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The editor documentation of `MessageCommandOptions`, `MessageHandlerOptions`, `route`, `Route`, `RouteParams`, `RouteValue` and `RouteValues` says what each is for, with an example that compiles, and links the guide.
|
|
46
|
+
|
|
47
|
+
- [#234](https://github.com/meocord/meocord/pull/234) [`4c9c1dc`](https://github.com/meocord/meocord/commit/4c9c1dc20180f8002cba7983b9c3dd47de59887e) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The editor hover for `@MessageHandler`, `@ReactionHandler`, `ReactionHandlerAction`, `CommandNotFoundError`, `MessageUsageError` and the message param types (`ParamsOf`, `ParamRefsOf`, `EntityRef`, `MessageParamType`, `MessageParamTypes`, `CheckedParams`, `MessageScope`, `MessagePrefix`, `ReactionHandlerOptions`, `ReactionHandlerSettings`, `MessageUsageIssue`, `MessageParams`) now says in a sentence what each is, when to use it and what to use instead, with an example that compiles against the published types.
|
|
48
|
+
|
|
49
|
+
- [#230](https://github.com/meocord/meocord/pull/230) [`1004d7b`](https://github.com/meocord/meocord/commit/1004d7be4cc3782ebdd741e2b83d779731ff7785) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The JSDoc of the types and helpers a guard, interceptor, filter, pipe or observer works with is rewritten for the hover in your editor: `ExecutionContext`, `GuardDeniedError`, `ValidationError`, `createMetadata`, `SetMetadata`, `applyDecorators`, `StageParams`, `Piped`, the stage interfaces, the observer types, the Standard Schema types and the command builder types. Each has a one-line summary and when to use it, and each example compiles against the published types.
|
|
50
|
+
|
|
51
|
+
- [#232](https://github.com/meocord/meocord/pull/232) [`fcd3457`](https://github.com/meocord/meocord/commit/fcd3457492b5915ec99b75748b7181a6135dc128) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The JSDoc of `respond`, the theme API (`useTheme`, `bindTheme`, `UseTheme`, `ThemeCache`, `Theme` and the theme types), the errors a user is shown (`UserError`, `CooldownError`, `CooldownStoreError`), the presenter types, the translator and the cooldown stores now follows the JSDoc standard, for the hover in your editor and the API reference. Every example among them compiles against the published types: those that read an `interaction`, a database or an app they did not declare are now complete, and `MemoryCooldownStore`, `Theme`, `cooldownMessage` and `cooldownStoreMessage` gain one.
|
|
52
|
+
|
|
53
|
+
- [#235](https://github.com/meocord/meocord/pull/235) [`ee38bcb`](https://github.com/meocord/meocord/commit/ee38bcb6834033c77e11830fdded5480719b8b06) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The JSDoc of `meocord/testing`'s mocks follows the standard in CONTRIBUTING.md: `createMockInteraction`, `createMock`, `createMockUser`, `createMockClient`, `createMockGuild`, `createMockChannel`, `createMockMessage`, `createChatInputOptions`, `createModalFields`, `createDiscordError`, `createMockTheme`, `withTheme`, `createMockFn`, `isMockFunction`, `clearAllMocks` and `resetAllMocks`, with the types they take and return. Each has a one-line summary, when to use it, and an example that compiles against the published package, and declares everything it uses. `MockInstance`'s methods describe themselves on hover.
|
|
54
|
+
|
|
55
|
+
- [#233](https://github.com/meocord/meocord/pull/233) [`5f42ad2`](https://github.com/meocord/meocord/commit/5f42ad2fa683d03531e93b79a5ee558d8e88f518) Thanks [@l7aromeo](https://github.com/l7aromeo)! - The JSDoc of `meocord/testing`'s module and inspection helpers follows the standard in CONTRIBUTING.md: `MeoCordTestingModule`, `TestingModuleBuilder`, `TestingModule` and their options and results, `getResponse`, `inspectHandler`, `createExecutionContext`, `resolveRoute`, `findRouteConflicts`, `expectCompleteCatalog` and `testCooldownStore`. Each has a one-line summary, when to use it, and an example that compiles against the published package, and every option documents itself, so the hover in your editor and the API reference say the same thing.
|
|
56
|
+
|
|
57
|
+
- [#247](https://github.com/meocord/meocord/pull/247) [`b31f281`](https://github.com/meocord/meocord/commit/b31f281fc85692414718dbddd12404034b5ed337) Thanks [@l7aromeo](https://github.com/l7aromeo)! - `bun run lint` in an application prints nothing when the code is clean. `meocord/eslint` gives its import resolver the application's three tsconfigs, so each file resolves aliases through the tsconfig that includes it, and the resolver printed `Multiple projects found, consider using a single tsconfig with references…` on every run. It now sets the resolver's `noWarnOnMultipleProjects`, since several projects are the intended setup. Existing applications get it by updating meocord; nothing in them changes.
|
|
58
|
+
|
|
59
|
+
- [#238](https://github.com/meocord/meocord/pull/238) [`dba5def`](https://github.com/meocord/meocord/commit/dba5def4f87aeef879e7ca62050ac821b4d23480) Thanks [@l7aromeo](https://github.com/l7aromeo)! - A message command's usage reply reads right for every param type: a word of the wrong type is now `"lots" is not a valid whole number`, so an app's own type labelled with a noun such as `emoji` reads `is not a valid emoji`, where it read `is not a emoji`. A `bool` param is named a `yes or no answer`. A role deleted while a command's guards ran is named `<@&id> is not a role in this server`, and a value of an app's own type whose `EntityRef` resolves to nothing `is not a valid <label>`, where both read `is not a value of its type`. A `MessageParamType`'s `label` is the bare noun, such as `hex colour`, as its example now shows. A test that matches the old wording, such as `is not a whole number`, needs the new one.
|
|
60
|
+
|
|
61
|
+
- [#250](https://github.com/meocord/meocord/pull/250) [`873aeab`](https://github.com/meocord/meocord/commit/873aeabaeb0d4ad11cfa4c7aaffcc0cc7e589d19) Thanks [@l7aromeo](https://github.com/l7aromeo)! - `MessageParamType`'s documentation link in your editor opens the message params page, which covers typed params and your own param types, rather than the message commands page.
|
|
62
|
+
|
|
63
|
+
- [#225](https://github.com/meocord/meocord/pull/225) [`c862b1f`](https://github.com/meocord/meocord/commit/c862b1f637c50a53d8e1551a6ad1106cc08806ef) Thanks [@l7aromeo](https://github.com/l7aromeo)! - Importing `meocord/common` no longer computes the Redis script hash until a `RedisCooldownStore` uses it. Each script's SHA1 is worked out the first time a store given `evalsha` runs it, then kept, so an app that never uses Redis hashes nothing, and one without `evalsha` never needs the hash.
|
|
64
|
+
|
|
65
|
+
- [#237](https://github.com/meocord/meocord/pull/237) [`69ec4e8`](https://github.com/meocord/meocord/commit/69ec4e808f3709bfa5dfcfd6dc3939c73cee86b2) Thanks [@l7aromeo](https://github.com/l7aromeo)! - `getResponse(interaction).sent` counts only calls Discord accepted. A reply, update, edit or follow-up that Discord refused, such as a reply rejected with 10062 once the three seconds passed, used to count as sent, so a test of what the member sees after an expired interaction could pass while the member saw nothing. The refused call stays in `calls`, in the order it was made, and carries what it rejected with as `error`, the new optional field of `ResponseCall`: every call `respond()` makes, deferrals and modals included, is marked this way.
|
|
66
|
+
|
|
3
67
|
## 4.1.0-beta.5
|
|
4
68
|
|
|
5
69
|
### Minor Changes
|