Respond to the person who used the command (Js)

You use context in yours isntead of tags

So

function onMessageHandler (target, context, msg, self) {
  if (self) { return; } // Ignore messages from the bot


  const commandName = msg.trim();


  if (commandName === '!hnum') {
    const num = rollDice();
    client.say(target, `ID USER as tiré un ${num} !`);
    console.log(`* Executed ${commandName} command`);
  } else {
    console.log(`* Commande inconnue ${commandName}`);
  }
}

Change

function onMessageHandler (target, context, msg, self) {

to

function onMessageHandler (target, tags, msg, self) {