0

So I'm doing an automated response command but I need to to respond with more than one line. (I use node.js/discord.js? and I'm coding a Discord bot) Can somebody let me know what I would need to do make it more than one line? The following is what I have at the moment.

      client.on('message', msg => {
    if (msg.content === '<response trigger>') {
    msg.channel.send('<Where the response would go>');
    }
  });

1 Answers1

0

Creating multiline response with discord.js is completely unrelated to the library itself. You simply have to specify a string with a line break.

One possibility to start a new line is by inserting \n into your string. There are also other possibilities to do this, just take a look at this answer.

In your case a multiline response could look like this:

client.on('message', msg => {
  if (msg.content === '<response trigger>') {
    msg.channel.send('line1\nline2');
  }
});
finn
  • 653
  • 3
  • 15