Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update information about blank fields in embed guide #1572

Open
ThatsEmbarrassing opened this issue Jul 29, 2024 · 7 comments
Open

Update information about blank fields in embed guide #1572

ThatsEmbarrassing opened this issue Jul 29, 2024 · 7 comments
Labels
t: request Suggestion to add new or change existing content

Comments

@ThatsEmbarrassing
Copy link

Is your feature request related to a problem? Please describe.

Discord has no feature to create embeds with multiple columns on each row(e.g. 2x2), so the guide suggests using "blank fields". In order to use them, you need to write something like "\u200B" in both name and value fields. But this looks actual awful.

There's a better alternative. You can use "\t" instead of the way described in the current guide. It looks a little prettier and an embed has less space between rows.

So my suggestion is replacing "\u200B" to "\t" in the guide, because this looks nicer.

Describe the solution you'd like

Replace "\u200B" to "\t" escaped symbol in the guide about creating embeds in discord.js.

Describe alternatives you've considered

No response

Additional notes

No response

@ThatsEmbarrassing ThatsEmbarrassing added the t: request Suggestion to add new or change existing content label Jul 29, 2024
@Qjuh
Copy link

Qjuh commented Jul 29, 2024

Can you show a screenshot and code of what you mean when you say „looks awful“ and „prettier“? The guide showcases an empty non-inline field while you seem to be talking about empty inline fields to have three inline fields as expected from discord.

@ThatsEmbarrassing
Copy link
Author

Sure I can!

image

And code:

const withU200B = new EmbedBuilder().setTitle('with \\u200B').setFields(
            {
                name: 'field 1',
                value: 'field 1',
                inline: true,
            },
            {
                name: 'field 2',
                value: 'field 2',
                inline: true,
            },
            {
                name: '\u200B',
                value: '\u200B',
            },
            {
                name: 'field 3',
                value: 'field 3',
                inline: true,
            },
            {
                name: 'field 4',
                value: 'field 4',
                inline: true,
            },
        );

const withT = new EmbedBuilder().setTitle('with \\t').setFields(
            {
                name: 'field 1',
                value: 'field 1',
                inline: true,
            },
            {
                name: 'field 2',
                value: 'field 2',
                inline: true,
            },
            {
                name: '\t',
                value: '\t',
            },
            {
                name: 'field 3',
                value: 'field 3',
                inline: true,
            },
            {
                name: 'field 4',
                value: 'field 4',
                inline: true,
            },
        );

@Qjuh
Copy link

Qjuh commented Jul 29, 2024

Make the third field inline too…

@ThatsEmbarrassing
Copy link
Author

Make the third field inline too…

Are you meaning the next field after "field 2"?. If you are, there's no point in doing this way.

This "empty" field makes new line in an embed, so putting "field 3" and "field 4", what are both inline, in the next line becomes possible. If I make the "empty" field inline too, the embed will be broken. That's obviously not the expected behaviour I'd like.

@Qjuh
Copy link

Qjuh commented Jul 29, 2024

In what way would it be broken? Embeds have 3 fields per line when inline. So the third (empty) field being inline is exactly what you need to have two columns of fields without any additional space in between. Did you try it or just assume it to be broken if you did?

@ThatsEmbarrassing
Copy link
Author

ThatsEmbarrassing commented Jul 29, 2024

I did try this when I was looking for the way how to put multiple columns in each row. However, the columns are unevenly aligned with each other in both ways: using "\u200B" and "\t".

Here's a screenshot how it looks like:

const withU200B = new EmbedBuilder().setTitle('with \\u200B').setFields(
            {
                name: 'field 1',
                value: 'field 1',
                inline: true,
            },
            {
                name: 'field 2',
                value: 'field 2',
                inline: true,
            },
            {
                name: '\u200B',
                value: '\u200B',
                inline: true,
            },
            {
                name: 'field 3',
                value: 'field 3',
                inline: true,
            },
            {
                name: 'field 4',
                value: 'field 4',
                inline: true,
            },
        );

const withT = new EmbedBuilder().setTitle('with \\t').setFields(
            {
                name: 'field 1',
                value: 'field 1',
                inline: true,
            },
            {
                name: 'field 2',
                value: 'field 2',
                inline: true,
            },
            {
                name: '\t',
                value: '\t',
                inline: true,
            },
            {
                name: 'field 3',
                value: 'field 3',
                inline: true,
            },
            {
                name: 'field 4',
                value: 'field 4',
                inline: true,
            },
        );

@Qjuh
Copy link

Qjuh commented Jul 29, 2024

Missing the third field in the second row

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: request Suggestion to add new or change existing content
Projects
None yet
Development

No branches or pull requests

2 participants