10 Replies
d.js toolkit
d.js toolkit3w 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 OP
MYA
MYA3w ago
CombinedPropertyError (1)
Received one or more errors

input[0]
| CombinedPropertyError (1)
| Received one or more errors
|
| input.value
| | ValidationError > s.string
| | Expected a string primitive
| |
| | Received:
| | | undefined
CombinedPropertyError (1)
Received one or more errors

input[0]
| CombinedPropertyError (1)
| Received one or more errors
|
| input.value
| | ValidationError > s.string
| | Expected a string primitive
| |
| | Received:
| | | undefined
I tried removing the .id at the end of line 8 but that didnt seem to do anytning apart from changing the received data type from undefined to object
TÆMBØ
TÆMBØ3w ago
<Promise>.id isn't a thing. You need to handle the Promise returned from fetch() before you can use any resolved data from it. Why not just pass caseObject.Admin to your field value instead since your current implementation seems to suggest you just want to put the user ID in the field value? Why bother fetching?
MYA
MYA3w ago
I just put the id there to test. I actually wanted to put the user's username in there so I would have to use the .then() and .catch() functions?
TÆMBØ
TÆMBØ3w ago
That's one way, however you can also just wrap your Promise statement in brackets () so you'd then be accessing the resolved value (assuming it does resolve), (await ...).id
MYA
MYA3w ago
like this? { name: "Admin", value: await (interaction.guild.members.fetch(caseObject.Admin)).id }
TÆMBØ
TÆMBØ3w ago
Your await is outside of the brackets, so no that won't work
MYA
MYA3w ago
O
TÆMBØ
TÆMBØ3w ago
You can also just make a variable for this fetch() request above if you plan to use any of this member data elsewhere
MYA
MYA3w ago
Ohh yeahh Yeah it works like a charm thx
Want results from more Discord servers?
Add your server