meshcore.js
Replies

Overriding texts

English by default, French in one line, partial overrides, and what stays English.

Every text the library puts on the air comes from client.replies, the merge of englishReplies with the replies option given to the Client.

French in one line

frenchReplies is a complete French set. Pass it as replies and every text is French, with the same parameters.

main.ts
const client = new Client({
  transport: new SerialTransport({ path: '/dev/ttyACM0' }),
  replies: frenchReplies,
});

A few texts

replies takes a partial object. Only the keys given replace the default. Function entries keep their parameters.

main.ts
const client2 = new Client({
  transport: new SerialTransport({ path: '/dev/ttyACM0' }),
  replies: {
    unknownCommandDM: '❓ Commande introuvable, tape /help',
    cooldown: (seconds) => `⏳ Patiente encore ${seconds}s`,
  },
});

What stays English

Command names and actions are not translated. help, plugins, jobs and the actions load, unload, reload, run, pause, resume are the same in every bot.

Reference

On this page