Skip to content

Category: Questions

Group numbers from array that are right after each other

I have an array with some numbers like the following: I’d like to show all numbers that are direct after each other (n+1) in one line and if there is a gap, this should be separated. This will either be done in javascript/jquery. The user would see it like this: I’m guessing the only solution to t…

How do I fix CLIENT_MISSING_INTENTS error?

I started learning about discord.js, but now I am facing this issue. I tried some googling, but I couldn’t manage to fix it. This is the error I am getting: Answer You need to specify the events which you want your bot to receive using gateway intents. Instead of const client = new Discord.Client(); Use…

How to customize Dropzone js?

How do I customize Dropzone js? I searched for hours, but only gone in loops. I’m trying to go from this… To something like this… I don’t need the background or any fancy styles, and the functionality already works. I Just mainly need the files to be like they are in the red box. But I…

discord.js Editing a message and sleeping

So I am very new to discord.js and wanted to know how I can edit a message and then sleep and then edit the message again so it doesn’t cause extremely fast edits. I found this code and couldn’t figure out what to do Answer As suggested by LercDsgn in the comments, you can use setTimeout to edit t…

img tag removing slashes from the src

the problem I’m facing is that I get a image URL from an input tag then storing it in a let then I create a li tag with an image tag in it. I put imageURL variable in the src but the image tag removes the slashes from the variable Answer Note that has special meaning. So you need

Socket listener not getting updates from React state

I have a component in which I set my state from the passed parameters to the component I set the activeList state from the passed params and then on click I update the state in order to show filtered results So ultimately users can filter their chat lists based on the chosen index And everything works fine, t…