client.on("message", msg => {
        if (msg.content === "<Put your message identifier>") {
          msg.reply("Write your reply here");
      Javascript language logo

      Reply to text messages via your discord bot

      Discord Js Cookbook

      The code is saying that when a message is sent to the client, the client should run a function named msg => { .. }. If the message's content matched the identifier in the message, the client should reply with given reply .

      Shortcut: discord.reply


        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.