#Making embed wider

66 messages · Page 1 of 1 (latest)

solid kestrel
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

plain galleon
#

no

polar sky
#

not even a fancy workaround?

plain galleon
#

not a good one, no

polar sky
#

I've managed to be a bit hacky and make it wider, but it only makes the background wider - the content doesn't fill

visual horizon
#

Embeds are flex to the screen

high sandal
#

you can't have 5 inline fields

visual horizon
polar sky
#

doesn't seem to be taking up anywhere near enough

#

I've seen wider embeds than mine before

high sandal
#

they flex to content

polar sky
#

So it refuses to let me have more than 3 fields in one line? outright?

high sandal
#

yes that's how discord works

polar sky
#

and can't get around that?

high sandal
#

you'd have to make a single field show up as multiple, or similar for the description

visual horizon
#

Try wider titles, no?

#

Like ============Title============

#

Or smt

visual horizon
#

Idk

high sandal
#

no, fields are fixed to 3 per line

visual horizon
#

Yeah, but wider titles might make the embed itself wider to accommodate longer titles

#

I don't have any ideia if it works tbh

polar sky
high sandal
#

you'd need to not use 5 fields

#

unfortunately, discord doesn't allow html insertion

eternal phoenix
#

on mobile it will look sht either way lol

polar sky
#

running on no sleep, here - is there a reason Cargos is being pushed over, I've padded the strings to a length of 25

#
 const embedTemplate = {
        'embeds': [
            {
                'type': 'rich',
                'title': 'Active Ships',
                'description': `\n\n${emojis['sloop']} Sloop, ${emojis['brig']} Brigantine, ${emojis['galleon']} Galleon\n\n${emojis['gold_hoarders']} Gold Hoarders\n${emojis['merchant_alliance']} Merchant Alliance\n${emojis['order_of_souls']} Order of Souls\n${emojis['athenas_fortune']} Athenas Fortune\n${emojis['reapers_bones']} Reapers Bones\n\n*\\*ship is captained*`,
                'color': 0xe6c400,
                'fields': [
                    {
                        'name': '** **',
                        'value': '\u200B',
                    },
                    {
                        'name': 'Server 1',
                        'value': '\u200B',
                        'inline': false,
                    },
                    {
                        'name': ships.map(ship => {
                            const display_name = `${ship_by_capacity[ship.capacity]} ${ship.emissary} ${ship.name.padEnd(25, ' ')}`;
                            return display_name;
                        }).splice(0, 3).join(' '),
                        'value': '\u200B',
                        'inline': false,
                    },
                    {
                        'name': ships.map(ship => {
                            const display_name = `${ship_by_capacity[ship.capacity]} ${ship.emissary} ${ship.name.padEnd(25, ' ')}`;
                            return display_name;
                        }).splice(3).join(' '),
                        'value': '\u200B',
                        'inline': false,
                    },
                    {
                        'name': '** **',
                        'value': '\u200B',
                        'inline': false,
                    },
                ],
            },
        ],
    };
#

@high sandal mentioning as it was your advice

high sandal
#

using spaces to separate wouldn't have consistent results

#

tabs might be closer

polar sky
#

any advice what to use in place?

high sandal
#

but not sure if discord processes tabs to have them work as such

polar sky
# high sandal tabs might be closer
                    {
                        'name': ships.map(ship => {
                            const display_name = `${ship_by_capacity[ship.capacity]} ${ship.emissary} ${ship.name.padEnd(8, '\t')}`;
                            return display_name;
                        }).splice(0, 3).join(' '),
                        'value': '\u200B',
                        'inline': false,
                    },
                    {
                        'name': ships.map(ship => {
                            const display_name = `${ship_by_capacity[ship.capacity]} ${ship.emissary} ${ship.name.padEnd(8, '\t')}`;
                            return display_name;
                        }).splice(3).join(' '),
                        'value': '\u200B',
                        'inline': false,
                    },
#

closest I've got with tabs

#

another tab ruins it

high sandal
#

oh nice

#

oof

polar sky
#

fine tune with spaces or ?

high sandal
#

spaces wouldn't be reliable

#

font differences would break it just due to how spacing works

polar sky
#

gotcha

#

how about a non unicode whitespace?

high sandal
#

an alternative would be to make a table and send it as an image ig

high sandal
#

you can't.

polar sky
#

you can?

high sandal
#

no

#

discord wouldn't be able to process it

#

discord, as well as 90% of the internet, uses unicode

#

the other 10% uses ascii

#

everything you're sending here is using unicode, spaces are unicode, tabs are unicode, the zwsp \u200B is unicode

polar sky
#

ahah I did it

#
                            const display_name = `${ship_by_capacity[ship.capacity]} ${ship.emissary} ${ship.name.padEnd(8, '\t')}\t`;}
#

for some reason adding another tab without using it in the pad function works

high sandal
#

ah yeah since that's not how tabs work lol

polar sky
#

but if I pad to 9, it doesn't

high sandal
#

you don't use tabs in padEnd

#

you don't use tabs in padding, in general

#

tabs take up multiple characters

#

have you not used tabs in like word or notepad?

polar sky
#

yes ofc, but the amount of tabs I'd need is variable

#

hence padend