Ask Your Question
0

Can two items be embedded inline in Discord.js?

asked 2023-06-06 11:25:03 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-06 11:41:01 +0000

bukephalos gravatar image

Yes, two items can be embedded inline in Discord.js using the inline property in the addField() method. By setting this property to true, the next field will display inline with the previous one instead of taking up a new line. Here's an example:

const exampleEmbed = new Discord.MessageEmbed()
    .setColor('#0099ff')
    .setTitle('Example Embed')
    .addFields(
        { name: 'Field 1', value: 'Value 1', inline: true },
        { name: 'Field 2', value: 'Value 2', inline: true },
    )
    .setTimestamp();

channel.send(exampleEmbed);

In this example, Field 1 and Field 2 will be displayed inline next to each other with their respective values.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-06 11:25:03 +0000

Seen: 16 times

Last updated: Jun 06 '23