7

The standard way of sending an embedded message is:

message.channel.send({embed: {
      color: 3447003,
      title: "Test:",
      fields: [
        { name: "Test 1", value="Test"},
        { name: "Test 2", value: "TEST"},
        { name: "Test 3", value: "TEST"}
      ]
    }
  });

I was wondering if there is any way I could make the messages in block form for example:

Test1:                    Test2:
test1                     test1
test2                     test2
test3                     test3
test4                     test4

I'm aiming so it goes inline and you can input multiple values/per title. First I thought that \n would do the trick but it doesn't work. I tried some other things as trying to add a embed-manager.js to it but it doesn't work aswell.

message.channel.send({embed: {
      color: 3447003,
      title: "Test:",
      fields: [
        { name: "Test 1", value="Test1 \n Test2 \n Test3"},
        { name: "Test 2", value: "TEST"},
        { name: "Test 3", value: "TEST"}
      ]
    }
  });

I am aiming for something like this: Example picture

Thank you for your help in advance.

1 Answer 1

13

First you can't use = on objects. It's always :
You can use \n to make a break line.
You can use inline: true so it shows up to 3 fields in one line.

message.channel.send({embed: {
      color: 3447003,
      title: "Test:",
      fields: [
        { name: "Test 1", value: "Line1\nLine2\nLine3", inline: true},
        { name: "Test 2", value: "AlsoLine1\nAlsoLine2\nAndLine3", inline: true}
      ]
    }
  });

This is the result of this code:
Code result

Sign up to request clarification or add additional context in comments.

1 Comment

I apologize for the post as I have missed the =. Thank you for your post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.