#(jepu_bot) Tag for `Name` Modal Event
54 messages · Page 1 of 1 (latest)
(jepu_bot) Tag for Name Modal Event
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
!search modal
[Partial Name Match] !Command discordmodal, !Event discord modal submitted.
!command discordmodal
dDiscordBot
external
discordmodal [interaction:<interaction>] [name:<name>] [rows:<rows>] (title:<title>)
Manages Discord modals.
With this command you can respond to an interaction using a modal.
A "modal" is a popup window that presents the user with a form to fill out.
You can specify the modal's internal name for matching with in events.
You can specify the title as text to display to the user.
You can specify rows of user-inputs using !objecttype DiscordTextInputTag. At time of writing, Selection input is not supported.
You can listen to the responses to forms using !event discord modal submitted.
You...
[name:<name>] is the name you create when creating the modal
eg:
- ~discordmodal interaction:<context.interaction> name:example_modal title:Modal! rows:<[rows]>
name:example_modal indicates the modal name name:example_modal
do i have to make separate events for each of my modals?
i was trying to make it procedural-ish
!event modal
dDiscordBot
Discord
discord modal submitted
for:<bot> to only process the event for a specified Discord bot.
channel:<channel_id> to only process the event when it occurs in a specified Discord channel.
group:<group_id> to only process the event for a specified Discord group.
name:<modal_name> to only process the event for a specified Discord modal.
when a Discord user submits a modal.
<context.bot> returns the relevant DiscordBotTag.
<context.channel> returns the DiscordChannelTag.
<context.group> returns the DiscordGroupTag.
<context.interaction> returns the DiscordInteractionTag.
<context.values> returns a MapTag of the values submitted by the user.
name:modal can be a matcher i believe
eg; name:example_1|example_2 or name:example_*
i'd try it and see to verify
if not, you can inject or run a task script
my plan was to generate buttons (that create modals) based on a maptag that im looping through, so i wanted it to only use a single event for all the modals
the above is still the answer to that
i wanted to categorize modals based on their names
we're entering the land of vague context here now 
you can use choose/case or if/else if/else for context names
and you can use matchers in the event lines for switches
but you might need a lot more context for the best answer
!xy
Your question seems to be an XY Problem - you're asking about your attempted solution rather than your original problem.
Read in detail about the XY Problem here: http://xyproblem.info/
For an example of an XY Problem we've seen in Denizen, the question "how do I make an event for when a flag expires" has no answer, but the same question asked with full background detail will be something more like "I have this script: [LINK HERE], which sets a 3 minute cooldown flag on a player for when they use an ability. I want the player to be notified when the cooldown completes - how do I do this?" which we can then answer quite effectively (in this example, all that was needed was a simple wait command, no events or flag-listening or anything).
im having a hard time explaining it unfortunately
hmm
i want to use something like choose <modal name>:
so i only have to use one event for all of my modals
but theres no tag for the modal name
!tag DiscordInteractionTag.target_message
Returns the message being targeted by a MESSAGE application interaction.
dDiscordBot
DiscordMessageTag
probably not that, uh
Thread is now a Feature thread. This indicates a request for a new feature to the plugin, that both (A) does not already exist and (B) reasonably can be added. If you are unsure whether this applies, use /helpthread to change back to a normal help thread.
ref #commit-log I added context.name
Has your issue been resolved, or your question been answered?
If so, please type /resolved to close your thread.
If not, please reply below to tell us what you still need.
Note that if there is no reply for a few days, this thread will eventually close itself.
@drifting pulsar
thank you! ill try it out