I want to make a discord bot program. when someone new goes to the server they have to type !daftar to be able to enjoy the server. and when they type !daftar message list will appear on #welcome channel. but I get an error that is in the title. here is my code Answer GuildMember is not exactly defined. Yes,
Dynamically add DIV element with varying values
I would like to create a div card dynamically with varying values depending on the result of my API. Currently, values keep overriding each other because they all share the same element ID. Is there a way for me to dynamically add all the values into their own cards? Answer A simple way that works with your c…
Add a video control on top of a local html video
The following is a link which shows a nice example of playing a local video in a browser: http://jsfiddle.net/dsbonev/cCCZ2/ However, on top of this, I would like to allow the user to create a “trailer clip” of a particular segment of their video. In this, I would like to have some sort of adjusta…
add block-input from sanity.io to next.js blog post
I’m developing a blog on next.js with sanity.io, and I’m having trouble using the code-input plugin. What I do have I’m able to use the code component block on sanity, which looks something like this: Everything good on the sanity side. My problem comes with using it on the next.js [slug].js…
Axios POST request sends data to Express server but Error 404
Axios POST request sends data to Express sever but Error 404 Hello, world, I am trying to build a user authentication server for a project I am working on, but I am running into a problem trying to send a POST request to my Node.js Express server. I want to send a POST request using Axios containing a usernam…
How to use an async database call to set a variable with useState() and useEffect()?
I’m trying to set a variable with a simple GET database call. The database call is returning the data correctly, but the variable remains undefined after every re-render. Code is below… the getMyThing() function in the useState() function is working correctly and returning the data I want. My thin…
How to get borders for the react-leaflet map and check markers inside the map?
My code is here: My question is, how can I use bbox to check if some of my markers is inside the map? When I try to apply: or this: I faced the error: bbox is not defined I don’t know how to return bbox from function LocationMarker(). I would be grateful for any help. Thank you. Answer You need
How to create an object dynamically using JavaScript?
I’m trying to create a new object from an array of strings, but I’m not able to create the desired object correctly. I’m trying to create an object like: Here’s my code: Answer Yes. First, we have to set result[item] to {} (a new, empty object):
Filter features with properties in OpenLayers
I’d like to filter features on the map using the feature properties. For example if I have this property in the geojson: And I want to see only featuers with Start > 10, how can I implement that features with Start < 10 are hidden? If I change the style with following code the features are transpa…
JavaScript 2 onclick Events but just do the first
I have a JavaScript functions which get run 2 times when I click on one element. Take a look at my code, I only want that the first call will be done not the second also: When I click on the image then also the p element with his onclick function will be run. Because the image onclick is inside