welcome not working

So I have this welcome script and its just not working I use @napi-rs/canvas Here is the code https://pastebin.com/BTD5EdZK
Pastebin
discord.js welcome - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
28 Replies
d.js toolkit
d.js toolkit11mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
Thatoneperson
ThatonepersonOP11mo ago
14.14.1 and node js 20
treble/luna
treble/luna11mo ago
do you have the GuildMembers intent also, you do not need to fetch channels they are cached by the Guilds intent
Thatoneperson
ThatonepersonOP11mo ago
yes
treble/luna
treble/luna11mo ago
you also create an attachment builder but do nothing with it
Thatoneperson
ThatonepersonOP11mo ago
yeah im new to this
treble/luna
treble/luna11mo ago
check if the guildMemberAdde vent fires, try to send a message without attaching the file if that works, your issue is with canvas and thus not djs relate
Thatoneperson
ThatonepersonOP11mo ago
client.on('guildMemberAdd', async (member) => { try { const channel = await member.guild.channels.fetch('1193854002597724220'); if (!channel.isTextBased()) return; await channel.send({ content: Welcome ${member.user.username}! }); } catch (error) { console.error('Error handling guildMemberAdd event:', error); } }); This still doenst work
treble/luna
treble/luna11mo ago
Show your client constructor
Thatoneperson
ThatonepersonOP11mo ago
sorry.. my what?
treble/luna
treble/luna11mo ago
where you instantiate your client
Thatoneperson
ThatonepersonOP11mo ago
what does that mean
treble/luna
treble/luna11mo ago
where do you create your client
Thatoneperson
ThatonepersonOP11mo ago
like my host?
treble/luna
treble/luna11mo ago
no did you write that code yourself ?
Thatoneperson
ThatonepersonOP11mo ago
no im using ai
treble/luna
treble/luna11mo ago
yeah dont
Thatoneperson
ThatonepersonOP11mo ago
but ai isnt always good
treble/luna
treble/luna11mo ago
its outdated
Thatoneperson
ThatonepersonOP11mo ago
well i have some ways
treble/luna
treble/luna11mo ago
Learn js yourself and dont ask ai i'm not gonna help you if you dont know how to code #rules 3
Thatoneperson
ThatonepersonOP11mo ago
im learning from ai but sure ill figure it out
treble/luna
treble/luna11mo ago
Consider follow actual up to date documentation and put in some effort yourself
Thatoneperson
ThatonepersonOP11mo ago
i put in effort lol im just starting and every video I watch is outdated atleast AI i can ask any question, I also use the guide to make it up to date, and be a little nicer not everyone knows code like you do dont blame them lol
treble/luna
treble/luna11mo ago
Then learn it, #resources
Thatoneperson
ThatonepersonOP11mo ago
im not a good learning type
treble/luna
treble/luna11mo ago
sigh
Thatoneperson
ThatonepersonOP11mo ago
i still try tho
Want results from more Discord servers?
Add your server