How can I convert a user's decimal input to hexadecimal with a Discord bot?

I am attempting to implement a functionality within my Discord bot to convert a user’s decimal number into its hexadecimal equivalent. Here is a snippet of my current setup:

Commands.toHex = {
  name: 'toHex',
  help: 'Converts your decimal number to hex',
  timeout: 10,
  level: 0,
  fn: function (message, input) {
    message.reply('Decimal to Hexadecimal').then((reply) => {
      reply.edit('<@' + message.author.id + '>, Converted Hex: ' + parseInt(input).toString(16).toUpperCase());
    });
  }
};

I am looking for help on how to achieve this conversion effectively. Thanks in advance!