#(jepu_bot) Tag for `Name` Modal Event

54 messages · Page 1 of 1 (latest)

drifting pulsar
#

How do i get the name of the Modal in Discord Modal Submitted Event. I noticed it has a name switch but no tag

hard pagodaBOT
#

(jepu_bot) Tag for Name Modal Event

hard pagodaBOT
#

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>

last tulip
#

!search modal

crimson jewelBOT
last tulip
#

!command discordmodal

crimson jewelBOT
# last tulip !command discordmodal
Required Plugins or Platforms

dDiscordBot

Group

external

Syntax

discordmodal [interaction:<interaction>] [name:<name>] [rows:<rows>] (title:<title>)

Short Description

Manages Discord modals.

Description

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...

last tulip
#

[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

drifting pulsar
#

do i have to make separate events for each of my modals?

last tulip
#

yes

#

unless they all run the same script

drifting pulsar
#

i was trying to make it procedural-ish

last tulip
#

!event modal

crimson jewelBOT
# last tulip !event modal
Required Plugins or Platforms

dDiscordBot

Group

Discord

Event Lines

discord modal submitted

Switches

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.

Triggers

when a Discord user submits a modal.

Context

<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.

last tulip
#

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

drifting pulsar
#

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

last tulip
drifting pulsar
#

i wanted to categorize modals based on their names

last tulip
#

we're entering the land of vague context here now kekw_dog

#

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

crimson jewelBOT
# last tulip !xy
Info: 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).

drifting pulsar
#

im having a hard time explaining it unfortunately

lament spearBOT
drifting pulsar
#

hmm

drifting pulsar
#

so i only have to use one event for all of my modals

#

but theres no tag for the modal name

last tulip
#

mmm

#

!tag interac

crimson jewelBOT
# last tulip !tag interac
Cannot Specify Searched Tag

Multiple possible tags: <DiscordInteractionTag.user>, <DiscordInteractionTag.id>, <DiscordInteractionTag.is_direct>, <DiscordInteractionTag.channel>, <DiscordInteractionTag.target_user>, <DiscordInteractionTag.target_message>, <discord_interaction[<interaction>]>.

last tulip
#

!tag DiscordInteractionTag.target_message

crimson jewelBOT
last tulip
#

probably not that, uh

grave sequoiaBOT
#
Changed to Feature

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.

simple pecan
grave sequoiaBOT
#
Thread Closing Reminder

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

drifting pulsar