how to make a ping command on a discord bot discord.js

JavaScript
  if(!message.content.startsWith(prefix) || message.author.bot) return;

     const args = message.content.slice(prefix.length).split(/+/);
     const command = args.shift().toLowerCase();

     if(command === 'ping'){
         message.channel.send('pong');
     }
Source

Also in JavaScript: