How can I find out if the person sending a slash command is in a channel? #8822
-
Everytime I try to use interaction.member or interaction.user I am encountering the same problem of:
Any help understanding why member is undefined is much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
"member" is not undefined, it cannot read property If you are following a guide, you might want to re-view how they define and pass these function arguments. Please note, that both GitHub discussions and the Discord server require some understanding of JavaScript, so that you can understand the answers given to you. You can find some common errors you may encounter during development at https://discordjs.guide/popular-topics/errors.html#javascript-errors |
Beta Was this translation helpful? Give feedback.
"member" is not undefined, it cannot read property
.member
OF undefined, suggesting thatinteraction
has the valueundefined
.This in turn suggests, that whatever you call
run(...)
with is not an object of the structure{interaction: value1, client: value2}
.If you are following a guide, you might want to re-view how they define and pass these function arguments. Please note, that both GitHub discussions and the Discord server require some understanding of JavaScript, so that you can understand the answers given to you.
You can find some common errors you may encounter during development at https://discordjs.guide/popular-topics/errors.html#javascript-errors