Anyone know why my command isnt working?
14 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
no errors
just app didnt respond
You should use collector to collect the modal interaction
![method](https://cdn.discordapp.com/emojis/874573924988518500.png)
And you also should show the modal to collect it
interaction.showModal(modal)
Also I recommend you to watch this video
https://youtu.be/CFRhGnuXG-4
CodeAesthetic
YouTube
Why You Shouldn't Nest Your Code
I'm a Never Nester and you should too.
Access to code examples, discord, song names and more at https://www.patreon.com/codeaesthetic
Correction: At 2:20 the inversion should be "less than or equal", not "less than"
ok , thank u
y i did a horrible code , im a bit new to coding so i thought it was the only solution , but when i searched bout it i found the switch thing and it makes my code much cleaner , thx for commenting about it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
.
@syjalo whats the difference beetween the collector and this?
Collectors are temporary and have filters and timers, designed to be used as follow-ups to things like commands
client
event listeners listen for the event until the bot restarts; when used in command files, the first command file creates 1 listener, and when the command is ran again, another listener is created. This means you end up having 2 listeners at once, both responding to the same new interactions, and they will continue to increase in amount as the command is used again.oh , thank u
is this right?
![](https://utfs.io/f/5d369a60-b614-48fd-962d-e0ae3828cebf-1nq2cb.png)
You need to define two separate interactions: the original interaction from the slash command, and the modal submit interaction from the modal collector
https://sourceb.in/brOk9RLiMg
like this?