#I want to make a welcome canvas but when
1 messages · Page 1 of 1 (latest)
How are we supposed to help without knowing the problem
umm did you catch error
it is AttachmentBuilder in v14(afaik) + you didn't import it
how can I import it ? after what line ?
in first lines
and what is the script for import it ?
do you know what import means?
yes
so what is the problem
But I already imported Discord: const Discord = require("discord.js");
It didn't work
then import it from Discord
you imported Discord which is object containing all things that discord.js exports
so Instead of let attachment = new MessageAttachment(image.toBuffer(), "Bienvenue1.png");,
let attachment = new Discord.MessageAttachment(image.toBuffer(), "Bienvenue1.png");
?
yep
no
no
^
aa ok
so I put
let attachment = new Discord.AttachmentBuilder(image.toBuffer(), "Bienvenue1.png");
close
but the second argument is supposed to be { name }
so (image.toBuffer(), { name: "Bienvenue.png" })
yes, you must send it as object↓
.send({ files: [attachment] })
update node
I have to re-download it at https://nodejs.org/en/ ?
anyway its warn and you can just ignore it
is there a command to see actual version of node.js ?
node -v
node -v
which to you have
19.3.0
so is there a way to not show this warn each time I restart my bot ? @elfin crag
idk never faced with it
ok