Ryan
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
@Qjuh Just wanted to apologize. I completely forgot the initial thing you mentioned -
toJSON
Adding that fixed everything. That's completely my bad.
For anyone else just joining in:
was the fix15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
But 2nd approach has a ts error:
15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
Yea i understand that, but, I would need to do
component.data.data.id
for it to find something, since component.data.id
always returns undefined
- and the 2nd .data
is not recognized by ts - i guess my question has shifted a bit now. Does that make sense?15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
Even if i want to replace both the TextDisplay and the Accessory?
I initially wanted to just do the accessory, but now want to change the entire section itself
15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
Only got to trying this out today, and what i've done so far:
I notice that it logs this:
-# can share the full log if needed
I've explicitly used
setId(1)
on the initial builder itself like so:
And noticed that when I do:
It will always be undefined
since as per the logs, i need to do component.data.data.id
but the 2nd .data
is not recognized by TS. Did i miss a step/perhaps didn't do the correct typing somewhere? Am i maybe just doing it wrong again lol? Thanks!15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
alr thanks. So even if the component is not necessarily the 1st component, giving it an id of 1 is ok
15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
also i'm not sure if this is correct, but when logging the container i noticed incremental ID's. Would I need to
setId
to something like 50 to avoid issues or does it not matter15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
yep thanks, Qjuh did mention. Thanks again
15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
Alr fine with that.
15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
i did that initially but typescript complains:
caused by:
15 replies
DIAdiscord.js - Imagine an app
•Created by Ryan on 4/27/2025 in #djs-questions
Edit components within a container (CV2)
i know spoon feeding is discouraged and i do not want you to, but could you perhaps send a small snippet of what you mean?
15 replies