Guides
Translate the replies
Every text the bot says on its own, in French or in your own words.
The bot refuses a command, asks for a DM, lists the plugins. All these texts are English by default and come from one place.
const client = new Client({
transport: new SerialTransport({ path: '/dev/ttyACM0' }),
replies: frenchReplies,
});const club = new Client({
transport: new SerialTransport({ path: '/dev/ttyACM0' }),
replies: {
...frenchReplies,
unknownCommandDM: '❓ Commande inconnue, essaie /help',
cooldown: (seconds) => `⏳ Encore ${seconds}s`,
},
});What happens
replies takes a partial object. Only the keys you give replace the default. frenchReplies is a
complete set, so spreading it first and overriding after works too.
Function entries keep their parameters, like cooldown(seconds).
Command names stay English. help, plugins, jobs and their actions are not translated.
Go further
- Overriding texts for the rules.
- All replies for every key and its default.
- Replies in the reference.