Custom prefix command with discord.js in commands folder

below is the code of my ping.js file in commands folder as suggested on discord.js documentation, but instead of using Slash command builder I am using this below method(no specific reason for not using Slash command builder), I just want to know whether this is a right approach or not as I am taking help from Chatgpt in it and i am not able to trust.

module.exports = {
    name: "ping",
    description: "Ping!",
    execute(message, args) {
        message.channel.send("Pong!");
    },
};

Thanks in advance