#createdTimestamp empty string

1 messages · Page 1 of 1 (latest)

hasty dust
#

@bold raptor

#

that is not how you do it

#

it's message.guild.createdTimestamp

bold raptor
#

i think i tried that hold on

#

yeah it doesnt work

#

im putting it in a embed btw

hasty dust
#

send your whole code

bold raptor
#
const exampleEmbed = new MessageEmbed()
.setColor('#0099ff')
.setTitle('Server Info')
.setAuthor({ name: 'Some name', iconURL: 'https://i.imgur.com/AfFp7pu.png', url: 'https://discord.js.org' })
.addFields(
    { name: 'Created at:', value: "test", inline: true },
    { name: 'Inline field title', value: message.guild.createdTimestamp, inline: true },
)
.addField('Inline field title', 'Some value here', true)
.setTimestamp()
.setFooter({ text: 'Cashier Bot' });

channel.send({ embeds: [exampleEmbed] });
#

not the most visually pleasing

hasty dust
#

is message defined?

bold raptor
#

yeah

#

the bot reads .content fine

hasty dust
#

Okay, so I think this is the issue

#

value of a embed field expects a string

#

and you provided a number which it converts to a object

bold raptor
#

ohhh

#

idk how to fix that in this coding language

hasty dust
#

You can cast it easily

#

Just use .toString()

bold raptor
#

just figured that out

#

thx

hasty dust