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
- 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 staff14.14.1 and node js 20
do you have the GuildMembers intent
also, you do not need to fetch channels
they are cached by the Guilds intent
yes
you also create an attachment builder but do nothing with it
yeah im new to this
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
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 workShow your client constructor
sorry.. my what?
where you instantiate your client
what does that mean
where do you create your client
like my host?
no
did you write that code yourself ?
no im using ai
yeah dont
but ai isnt always good
its outdated
well i have some ways
Learn js yourself and dont ask ai
i'm not gonna help you if you dont know how to code
#rules 3
im learning from ai
but sure
ill figure it out
Consider follow actual up to date documentation and put in some effort yourself
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
Then learn it, #resources
im not a good learning type
sigh
i still try tho