#Cannot read properties of undefined (reading 'name')
1 messages · Page 1 of 1 (latest)
Do you have a button file?
Sure
here
how is possibile?
I read it wrong, where is the component handler in your file struct?
which one?
The first one
Not sure which button file is giving an error though, could be any other button file
Are you exporting your buttons like this?
module.exports = {
data: {
name: "name",
},
You can't have an empty file in there..
Well there's the issue
Your handler is trying to receive name from this, but you never export it so it errors.
console.log(file) please
Before you're setting the buttons
ok i think its working
I recommend doing this for every handler anyways, you can always see which file is the issue if you have one.
new error
uhm ok
Show your code please
so interaction.GuildMember.role.cache....
No
and what
Please ask new questions in #djs-help-v14
uhm