> ## Documentation Index
> Fetch the complete documentation index at: https://www.chapterjs.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Changelog

> What changed in each version of ChapterJS

`chapterjs`, `create-chapterjs` and `create-chapter` share one version number, following [semantic versioning](https://semver.org): only a major version asks you to change your files, and its entry says what.

Only `chapterjs` lives in your project; `chapterjs dev` tells you when a newer one is out. To update it:

```bash pnpm theme={"theme":{"light":"github-light","dark":"vesper"}}
pnpm update chapterjs --latest
```

```bash npm theme={"theme":{"light":"github-light","dark":"vesper"}}
npm install chapterjs@latest
```

```bash yarn theme={"theme":{"light":"github-light","dark":"vesper"}}
yarn add chapterjs@latest
```

```bash bun theme={"theme":{"light":"github-light","dark":"vesper"}}
bun add chapterjs@latest
```

**0.5.1**

New templates

* [Templates](https://www.chapterjs.org/setup/project-structure.md#templates): `minimal`, preselected, is a presence and nothing else; `tickets`, `moderation`, `levels` and `giveaways` are complete bots.
* `default`, `music`, `community` and `games` are gone. Projects already made from them keep working.
* The [tutorial](https://www.chapterjs.org/tutorial/create-project.md) starts from `minimal`.

**0.5.0**

Menu commands, waiting, rotating presence

* [Menu commands](https://www.chapterjs.org/commands/menus.md): `command({ type: 'message' | 'user', ... })`, used with a right click.
* [Waiting for an answer](https://www.chapterjs.org/waiting.md): `waitForMessage()`, `collectMessages()`, `waitForClick()`, `waitForReaction()`.
* [Presence](https://www.chapterjs.org/presence.md#several-activities): several activities in turn, texts that are functions.
* A sixth template, `games`.

**Fixes**

* `chapterjs dev`: a second `default: true` in a new file no longer removes commands from Discord.
* `chapterjs dev`: a new file can no longer take the name of a store, command or component that already runs.
* Events and commands exported together in a list all run: only the last one did.
* A call refused by Discord that was not awaited (`member.ban()` without `await`) no longer stops the bot: it is reported with its line. `chapterjs test` no longer stops on one either.
* An answer asked without `await` is no longer reported as "finished without answering".
* `chapterjs dev`: one save reloads once, even when the editor writes then renames the file, and on Linux the saves that follow are no longer missed.
* A message with more than 5 rows of buttons and menus is refused before Discord with a clear message.
* `chapterjs test`: each case runs on a fresh server (a `/ban` no longer breaks the cases after it), a command that defers is no longer failed after 5 s, a stuck run no longer blocks what follows, and `join()` says voice is not simulated.
* `channelCreate`, `channelUpdate`, `channelDelete`: `guild` is never `null`, and `channel` is one of a server.
* A store file in `data/` with a damaged entry is refused with its name, instead of losing that entry the next time it is written.
* A plural's `zero` form is used for 0 in every language: English ignored it.
* `reply.opensForm()` takes a form that carries data.
* `chapterjs test`: the server refuses, as Discord does, to kick, ban or rename the owner or someone above the bot.
* Clearer messages: permissions in words ("Ban Members"), what Discord refusals mean, syntax errors, Redis refusing at start, `--processes` above the shards, the dev server in `start`.

**0.4.0**

Redis, rankings, events with guild

**To change in your files:** every event now gives what it is about plus `guild`. See [What each event gives](https://www.chapterjs.org/reference/events.md#what-each-event-gives); a file written the old way is underlined in your editor.

* [Stores in Redis](https://www.chapterjs.org/storage.md#in-redis): `storage: 'redis'`, with `REDIS_URL` in `.env`.
* Stores: `increment()`, `getMany()`, `setMany()`, `deleteAll()`; `update()` no longer loses a change made at the same time.
* [Rankings](https://www.chapterjs.org/rankings.md): `ranking()`, a score per member, always in order.

**0.3.0**

chapterjs test

* [`chapterjs test`](https://www.chapterjs.org/testing): your bot checked against a Discord in memory, no token needed.
* Scenarios: `scenario()` in `*.test.ts` files, from `chapterjs/test`.
* Every template has a `test` script and a scenario to start from.

**0.2.3**

Storage and five templates

* [Stores](https://www.chapterjs.org/storage.md): `store()` keeps data from one restart to the next, in `data/`.
* Five [templates](https://www.chapterjs.org/setup/project-structure.md#templates): `default`, `tickets`, `music`, `community`, `moderation`.
* A new project gets the exact version of `chapterjs` of `create chapterjs`.

**0.2.2**

A lighter default template

* The default template no longer has the moderation example.

**0.2.1**

New version notice

* `chapterjs dev` says when a newer `chapterjs` is out, with the command to update.

**0.2.0**

Your files, your order

**To change in your files:** commands and events take a `name`, languages a `locale`; components and tasks are named by their export. Files can be anywhere in `src/`. See [Project structure](https://www.chapterjs.org/setup/project-structure.md).

* The `…File` types are now `…Declaration` (`CommandFile` → `CommandDeclaration`…).

**0.1.4**

First version

* Commands, events, components, tasks, voice, presence and translated messages.
* `chapterjs dev`, `build` and `start`, and `create chapterjs`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.