Avant la connexion
✗ There is no .env file in this folder.
✗ There is no .env file in this folder.
chapterjs dev a besoin de BOT_TOKEN et DEV_GUILD_ID. Copiez .env.example vers .env et remplissez-les : voir Votre application Discord.✗ .env: BOT_TOKEN is empty. / is still the example value.
✗ .env: BOT_TOKEN is empty. / is still the example value.
Environment: au lieu de .env: quand la valeur vient de l’environnement et non du fichier.✗ .env: BOT_TOKEN contains a space, so it is not a whole token.
✗ .env: BOT_TOKEN contains a space, so it is not a whole token.
Bot devant ne pose pas de problème : il est retiré.✗ .env: DEV_GUILD_ID is empty.
✗ .env: DEV_GUILD_ID is empty.
✗ DEV_GUILD_ID is "…", which is not a server ID (an ID only has digits).
✗ DEV_GUILD_ID is "…", which is not a server ID (an ID only has digits).
✗ BOT_TOKEN is not set.
✗ BOT_TOKEN is not set.
chapterjs start n’a trouvé ni fichier .env ni BOT_TOKEN dans l’environnement. Sur un hébergeur, donnez BOT_TOKEN dans ses réglages (souvent appelés « variables d’environnement » ou « secrets »), ou mettez-le dans un fichier .env à côté de package.json. L’environnement l’emporte quand les deux sont là.✗ There is no src folder here.
✗ There is no src folder here.
package.json. Pour commencer un projet, lancez pnpm create chapterjs.✗ Discord refused the bot token.
✗ Discord refused the bot token.
BOT_TOKEN. Rien ne peut fonctionner tant que ce n’est pas corrigé, donc la commande s’arrête.✗ Discord could not be reached for GET …
✗ Discord could not be reached for GET …
✗ Discord refused a request the framework needs to start: …
✗ Discord refused a request the framework needs to start: …
⚠ Your bot is not in your dev server yet (DEV_GUILD_ID=…).
⚠ Your bot is not in your dev server yet (DEV_GUILD_ID=…).
chapterjs dev attend (Waiting for the bot to be added...) et continue tout seul avec ✓ The bot joined …. Si le lien affiche un autre serveur, DEV_GUILD_ID n’est pas l’identifiant d’un serveur que vous gérez. Lancé par un autre programme, le même message est un ✗ et la commande s’arrête.⚠ Your files need an option that is not enabled for your bot: …
⚠ Your files need an option that is not enabled for your bot: …
messageCreate et messageUpdate, Server Members Intent pour memberJoin, memberLeave, memberUpdate, threadMemberJoin et threadMemberLeave, Presence Intent pour presenceUpdate. Le message liste les fichiers qui ont besoin de chacun et donne le lien vers la bonne page : activez l’option sous Privileged Gateway Intents, puis enregistrez. Dans un terminal, chapterjs dev attend (Waiting for you to enable it...) et continue avec ✓ Privileged intents enabled. Lancé par un autre programme, et toujours avec chapterjs start, le même message est un ✗ et la commande s’arrête. Voir Intents privilégiés.✗ Discord refused the connection: the bot uses privileged intents (…) that are not enabled.
✗ Discord refused the connection: the bot uses privileged intents (…) that are not enabled.
✗ The bot needs to start N session(s) but Discord only allows M more until …
✗ The bot needs to start N session(s) but Discord only allows M more until …
✗ The bot is in too many servers for a single connection: it must use more shards.
✗ The bot is in too many servers for a single connection: it must use more shards.
✗ Discord refused the shard of this connection … / ✗ Discord refused the intents sent by the framework. This is a bug in ChapterJS
✗ Discord refused the shard of this connection … / ✗ Discord refused the intents sent by the framework. This is a bug in ChapterJS
✗ Discord no longer accepts the gateway version this version of ChapterJS speaks: update ChapterJS.
✗ Discord no longer accepts the gateway version this version of ChapterJS speaks: update ChapterJS.
chapterjs de votre projet, puis recompilez et relancez.✗ Discord closed the connection for good (close code …).
✗ Discord closed the connection for good (close code …).
ℹ Nothing to run yet: export a command or an event from a file of src/, like export default command({ name: 'ping', ... })
ℹ Nothing to run yet: export a command or an event from a file of src/, like export default command({ name: 'ping', ... })
src/ ne déclare ni commande ni événement. Le bot se connecte quand même. Déclarez-en un : voir Structure du projet.Pendant que votre bot tourne
✗ src/…:line …, then ⚠ Reloaded with an error: that file keeps running its last working version
✗ src/…:line …, then ⚠ Reloaded with an error: that file keeps running its last working version
✗ src/…:line … (while the bot runs)
✗ src/…:line … (while the bot runs)
✗ src/…:line …, puis This call was not awaited: write await in front of it (and async before run)
✗ src/…:line …, puis This call was not awaited: write await in front of it (and async before run)
await, et cela a échoué sans personne à prévenir. Sans cette ligne, Node aurait arrêté le bot ; à la place l’erreur est signalée avec votre fichier et la ligne, et le bot continue. Écrivez await devant l’appel et async devant run, pour que votre fonction l’attende et que ses erreurs soient signalées avec elle.↻ Your files now need more from Discord (…): reconnecting...
↻ Your files now need more from Discord (…): reconnecting...
✓ Reconnected, … loaded ; si cela demande un intent privilégié, voir plus haut.ℹ … only works in private messages, and chapterjs dev only runs your bot in …
ℹ … only works in private messages, and chapterjs dev only runs your bot in …
chapterjs dev ne fait tourner votre bot que sur votre serveur de test, donc une commande ou un événement réservé aux messages privés ne peut pas y être essayé. Cela fonctionne avec chapterjs start.ℹ /name is not the same here as in production, so … shows it twice
ℹ /name is not the same here as in production, so … shows it twice
✗ Discord refused the commands of your project: …
✗ Discord refused the commands of your project: …
⚠ Connection to Discord lost, reconnecting...
⚠ Connection to Discord lost, reconnecting...
↻ Reconnected to Discord. Vos fichiers continuent de tourner.⚠ src/commands/… /name finished without answering: the person sees "The application did not respond". Call interaction.reply() in run.
⚠ src/commands/… /name finished without answering: the person sees "The application did not respond". Call interaction.reply() in run.
run s’est terminée sans appeler interaction.reply(). Chaque commande doit répondre : voir Répondre.⚠ src/commands/… /name was used in a channel the bot can't answer in (…): it did not run.
⚠ src/commands/… /name was used in a channel the bot can't answer in (…): it did not run.
⚠ A … event was not given to your files: Discord did not let the bot read the channel it happened in (…).
⚠ A … event was not given to your files: Discord did not let the bot read the channel it happened in (…).
⚠ A … event was not given to your files: Discord did not let the bot read the user who did it (…).
⚠ A … event was not given to your files: Discord did not let the bot read the user who did it (…).
⚠ Voice: the bot asked to speak on the stage …: a moderator must accept, or give it the Mute Members permission so it speaks by itself.
⚠ Voice: the bot asked to speak on the stage …: a moderator must accept, or give it the Mute Members permission so it speaks by itself.
⚠ Voice: the voice server refused the bot (…): …
⚠ Voice: the voice server refused the bot (…): …
voice.connected vaut maintenant false. Rejoignez à nouveau ; si cela continue, ouvrez une issue avec le message.⚠ Voice: the end-to-end encryption of the call could not be updated (transition …): joining it again.
⚠ Voice: the end-to-end encryption of the call could not be updated (transition …): joining it again.
⚠ Voice: the bot lost its voice connection: …
⚠ Voice: the bot lost its voice connection: …
⚠ An event of Discord (…) could not be read: …
⚠ An event of Discord (…) could not be read: …
ℹ A new version of chapterjs is out: … (you have …). To update, run: …
ℹ A new version of chapterjs is out: … (you have …). To update, run: …
chapterjs dev. La troisième ligne mène à ce qui a changé. Rien n’est installé tout seul.ℹ Memory was getting full (…): the bot now remembers … members per server at most
ℹ Memory was getting full (…): the bot now remembers … members per server at most
ℹ Memory is fine again: the bot remembers up to … members per server again. le dit.⚠ The bot uses … of the … of memory it can use, and already remembers as little as it can
⚠ The bot uses … of the … of memory it can use, and already remembers as little as it can
Map à laquelle vous ajoutez sans jamais la vider). Beaucoup, et c’est toujours plein : votre bot est gros ; donnez-lui plus de mémoire avec NODE_OPTIONS=--max-old-space-size=4096 (en MB) sur une machine qui a autant. Voir Mémoire.⚠ Process N of M stopped by itself (…): starting it again. Its servers are back in a moment.
⚠ Process N of M stopped by itself (…): starting it again. Its servers are back in a moment.
[N] juste avant pour voir pourquoi il s’est arrêté.✗ Something unexpected happened: … This is probably a bug in ChapterJS
✗ Something unexpected happened: … This is probably a bug in ChapterJS
Compiler et lancer
✗ Your project has type errors, so it was not built:
✗ Your project has type errors, so it was not built:
typecheck de votre projet. La compilation ne livre jamais un fichier dont les types ne passent pas.ℹ Types were not checked: TypeScript is not installed in this project (or it has no tsconfig.json).
ℹ Types were not checked: TypeScript is not installed in this project (or it has no tsconfig.json).
tsconfig.json du modèle.✗ This file can't run, so your bot was not built. / can't be compiled / can't run once compiled
✗ This file can't run, so your bot was not built. / can't be compiled / can't run once compiled
chapterjs dev quand vous enregistrez. Corrigez-les et recompilez. can't be compiled est un fichier que le compilateur n’a pas pu lire ; can't run once compiled est un fichier qui tourne depuis src/ mais pas dans le bot compilé.✗ There is no build of your bot here.
✗ There is no build of your bot here.
chapterjs start fait tourner ce qu’a préparé chapterjs build, et rien d’autre. Lancez d’abord le script build, sur la même machine ou avant d’envoyer .chapterjs/build.✗ This build was made with chapterjs X, and this is chapterjs Y.
✗ This build was made with chapterjs X, and this is chapterjs Y.
chapterjs build.⚠ Your files changed since the last build: the bot runs the build, not your changes.
⚠ Your files changed since the last build: the bot runs the build, not your changes.
chapterjs build, puis relancez.✗ The build of your bot can't run any more: …
✗ The build of your bot can't run any more: …
chapterjs build : il dit quoi corriger.✗ This file of the build can't run any more, so the bot was not started.
✗ This file of the build can't run any more, so the bot was not started.
chapterjs build : il dit quoi corriger.✗ chapterjs start takes one option: --processes followed by a number, like "chapterjs start --processes 4". Got "…".
✗ chapterjs start takes one option: --processes followed by a number, like "chapterjs start --processes 4". Got "…".
chapterjs start ne prend que --processes avec un nombre entier de 1 ou plus. Avec un gestionnaire de paquets, mettez -- avant l’option quand il en a besoin : npm run start -- --processes 4.✗ "…" is not a command.
✗ "…" is not a command.
chapterjs a cinq commandes : dev, build, start, test et sync. L’aide affichée sous le message les liste.Tester
✗ This file can't run, so your bot was not tested.
✗ This file can't run, so your bot was not tested.
chapterjs dev quand vous l’enregistrez. Rien n’est testé tant que chaque fichier ne tourne pas : corrigez-les et testez de nouveau.✗ Checked src/…: command /name failed in N of M cases
✗ Checked src/…: command /name failed in N of M cases
ℹ No scenario yet. Write one in a *.test.ts file of src/ with scenario() from 'chapterjs/test' to check what your bot answers.
ℹ No scenario yet. Write one in a *.test.ts file of src/ with scenario() from 'chapterjs/test' to check what your bot answers.
✗ Tested src/….test.ts: "label" failed
✗ Tested src/….test.ts: "label" failed
⚠ src/….test.ts declares no scenario: export one made with scenario() from 'chapterjs/test'
⚠ src/….test.ts declares no scenario: export one made with scenario() from 'chapterjs/test'
*.test.ts n’exporte rien de fabriqué avec scenario(). Le bot ne charge jamais ces fichiers, donc ce qu’il contient ne tourne nulle part : exportez un scénario, ou renommez le fichier.… took more than 10 s: is something waiting for an answer that never comes?
… took more than 10 s: is something waiting for an answer that never comes?
bot.use() ou un bot.click() attend une fonction qui ne répond jamais, ou un cooldown refuse la seconde utilisation : le temps ne passe pas sur le serveur de test.Ce que les gens voient sur Discord
L’application ne répond pas
L’application ne répond pas
run s’est terminée sans appeler interaction.reply(). chapterjs dev vous prévient (⚠ … finished without answering). Chaque commande doit répondre : voir Répondre.Échec de l’interaction
Échec de l’interaction
run s’est terminé sans répondre. chapterjs dev vous prévient (⚠ … finished without answering). Répondez avec interaction.update(), interaction.reply(), ou interaction.deferUpdate() pour ne rien changer : voir Boutons.⚠ … was still running when its next time came: that run was skipped.
⚠ … was still running when its next time came: that run was skipped.
⚠ … was due while the bot was not connected: that run was skipped.
⚠ … was due while the bot was not connected: that run was skipped.
Something went wrong while running this command.
Something went wrong while running this command.
run a levé une erreur. La personne reçoit cette courte réponse, en privé ; vous recevez l’erreur avec le fichier et la ligne dans votre terminal. Quand Discord a refusé une action pour une permission manquante, la personne lit « I don’t have the permission to do that here. » à la place.This command can only be used in a server. / in a private message with me. / can not be used here.
This command can only be used in a server. / in a private message with me. / can not be used here.
where dans le fichier : voir Serveurs et messages privés.You need the … permission to use this command.
You need the … permission to use this command.
permissions, là où elle l’a utilisée. Voir Qui peut utiliser une commande.You can use this command again in …
You can use this command again in …
cooldown, et la personne l’a utilisée trop tôt. C’est ce que vous avez demandé : voir Délais entre deux utilisations. La réponse se supprime toute seule quand le délai se termine ; au-delà de 15 minutes, elle affiche la date et l’heure à la place.Ces réponses sont en anglais
Ces réponses sont en anglais
Une commande manque, ou apparaît en double
Une commande manque, ou apparaît en double
chapterjs dev, et partout avec chapterjs start. Si l’une manque, le terminal a dit pourquoi au démarrage : un nom que Discord a refusé, ou deux fichiers qui sont la même commande. En double : voir Un seul bot pour le dev et la production. Une commande que la personne ne voit pas est une commande dont elle n’a pas les permissions : voir Qui peut utiliser une commande.Le bot reste en ligne après que je l’ai arrêté
Le bot reste en ligne après que je l’ai arrêté
Ctrl+C et laissez-le se déconnecter : vous voyez ✓ Disconnected et le bot passe hors ligne immédiatement. Un second Ctrl+C arrête le processus sans attendre, et Discord garde alors le bot en ligne jusqu’à ce qu’il remarque que la connexion a disparu.