What you can do now
- Create a project with
create chapterjs, give it a token and a test server, run it withchapterjs dev. - Write a command with
command(), with options typed for you, answers public or private, slow or immediate. - React to events with an
event()per reaction, members and messages included, with intents worked out from your files. - Add buttons, menus and forms named by their export, carrying data, surviving restarts.
- Reuse embeds and build messages out of components.
- Schedule tasks, set the presence, and speak several languages with
t. - Test your bot without Discord: every file once by itself, and your scenarios with
scenario(). - Build and deploy, with a second application for production.
Habits that keep a bot healthy
- Read the terminal. Every message says what happened, then what to do. A
✗with a file and a line is the fastest route to a fix. - Let the editor work for you. When something is underlined, it is a mistake that would have reached a person. When nothing is completed, run
chapterjs sync. - Keep
runshort, and the logic insrc/lib/. - Think about who reads a message:
ephemeralfor the person,allowedMentionsfor texts you repeat,tfor the language. - Ask Discord for the least: the fewest privileged intents, the fewest permissions in the invite link.
- Test before every build, build before every deploy, and never share a token.
Where to look
Ideas for your bot
A few things that fit in a file each, with what you learned:/pollwith astringoption per answer, sending a poll (sending messages).- A
messageCreatefile that answers “gg” with a reaction (message events). - A
/ticketcommand that opens a form and creates a private thread withchannel.startThread()(forms, channels). - A
memberUpdatefile that logs nickname changes in a channel (events). - A task that posts the number of members every Sunday (tasks, translations).
Guide
One page per feature.
Reference
Everything, structure by structure.