Get attachment from command after modal submit
Hi there :waveBoye:
I'm currently working on a small
/bug report
command for a friend of mine. For now, it works like this:
- 1
Call the command and attach an Image (via .addAttachmentOption
)
- 2
Hit enter. Modal shows up > More info to add! Submit and done.
So, here's my question: What is the easiest way of getting an attachment url for an embed that'll be send to a private channel?
-# I thought I could make it easy for myself, but unfortunately I can't haha. Obviously, no more command data is transferred with a modal submit... :nerdSplain_siera:
Here'y my small test code:
3 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 OP:method: ChatInputCommandInteraction#awaitModalSubmit()
[email protected]
Collects a single modal submit interaction that passes the filter. The Promise will reject if the time expires.
Yeah true, I guess that's the easiest of doing so. Thank you!
:)