chapterjs, create-chapterjs and create-chapter share one version number, following semantic versioning: 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:
- Menu commands:
command({ type: 'message' | 'user', ... }), used with a right click. - Waiting for an answer:
waitForMessage(),collectMessages(),waitForClick(),waitForReaction(). - Presence: several activities in turn, texts that are functions.
- A sixth template,
games.
chapterjs dev: a seconddefault: truein 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()withoutawait) no longer stops the bot: it is reported with its line.chapterjs testno longer stops on one either. - An answer asked without
awaitis 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/banno 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, andjoin()says voice is not simulated.channelCreate,channelUpdate,channelDelete:guildis nevernull, andchannelis 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
zeroform 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,
--processesabove the shards, the dev server instart.
To change in your files: every event now gives what it is about plus
guild. See What each event gives; a file written the old way is underlined in your editor.- Stores in Redis:
storage: 'redis', withREDIS_URLin.env. - Stores:
increment(),getMany(),setMany(),deleteAll();update()no longer loses a change made at the same time. - Rankings:
ranking(), a score per member, always in order.
chapterjs test: your bot checked against a Discord in memory, no token needed.- Scenarios:
scenario()in*.test.tsfiles, fromchapterjs/test. - Every template has a
testscript and a scenario to start from.
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.- The
…Filetypes are now…Declaration(CommandFile→CommandDeclaration…).