Skip to content

Tag: javascript

Modal Collector Discord.js

I was trying to create a collector for my modal using Discord.js. With the code below I don’t get an error, but the modal fails in Discord and the code in collector.on never runs. I have used a similar approach to be able to create a button collector by replaycing the compententType: with “BUTTON&…

Input tag validation

I have just an input tag with the following logic: https://codepen.io/ion-ciorba/pen/MWVWpmR I have a minimum value coming from the database(400 in this case), the logic is good but the user interaction with the component is really bad, the user can’t input a value that is below 400, I want something el…

All my operators work as an add operator in my calculator

So basically when I want to subtract, it adds numbers. When I wrote the same code for multiply and divide, it did the same thing. Instead of dividing, it was adding numbers etc. I have no idea why it’s happening. It’s like my javascript ignores dataset.action and treats operators like one button. …