#I want to make a welcome canvas but when

1 messages · Page 1 of 1 (latest)

sinful parcel
#

Some help pls

proper plover
#

How are we supposed to help without knowing the problem

mint pebble
#

umm did you catch error

sinful parcel
#

yes but I made a new terminal. Wait 1 min

elfin crag
#

it is AttachmentBuilder in v14(afaik) + you didn't import it

sinful parcel
#

how can I import it ? after what line ?

elfin crag
#

in first lines

sinful parcel
#

and what is the script for import it ?

elfin crag
#

do you know what import means?

sinful parcel
elfin crag
#

so what is the problem

proper plover
#

import it from discord.js

#

simple

sinful parcel
#

It didn't work

elfin crag
#

then import it from Discord

#

you imported Discord which is object containing all things that discord.js exports

sinful parcel
#

so Instead of let attachment = new MessageAttachment(image.toBuffer(), "Bienvenue1.png");,
let attachment = new Discord.MessageAttachment(image.toBuffer(), "Bienvenue1.png");

#

?

elfin crag
#

yep

proper plover
#

no

elfin crag
#

no

proper plover
#

They said AttachmentBuilder

#

not MessageAttachment

elfin crag
#

^

sinful parcel
#

aa ok

#

so I put
let attachment = new Discord.AttachmentBuilder(image.toBuffer(), "Bienvenue1.png");

proper plover
#

close

#

but the second argument is supposed to be { name }

#

so (image.toBuffer(), { name: "Bienvenue.png" })

sinful parcel
#

ok ok

#

I have this error

elfin crag
#

yes, you must send it as object↓

proper plover
#

.send({ files: [attachment] })

sinful parcel
#

ok thx

#

THANKS IT WORKS

#

I just have a warn

elfin crag
#

update node

sinful parcel
elfin crag
#

anyway its warn and you can just ignore it

sinful parcel
#

is there a command to see actual version of node.js ?

elfin crag
#

node -v

proper plover
#

node -v

sinful parcel
#

ok I have the latest current

#

so I have to just ignore the warn ?

elfin crag
#

which to you have

sinful parcel
#

19.3.0

#

so is there a way to not show this warn each time I restart my bot ? @elfin crag

elfin crag
#

idk never faced with it

sinful parcel
#

ok