I’m trying to know if there is some face on an image and so I’m using tensorflow JS with blazeface model. But after getting the code an error appear: This is my code (I copy past it from the documentation): Remember that the error came from the following line const model = await this.blazeface.loa…
Tag: node.js
Discord.js v12 send the error message from dm
I want to sending the error message from dm to users. But I’m getting ReferenceError: error is not defined error. How can I fix this? Here is my index.js Answer Problem is solved.
Extracting a particular Project ID from Asana Task API via Node.js JSON output
Using the Asana Task API, we’re able to see the list of projects that a task belongs to, as well as those projects’ GID and Notes (description text). Desired outcome The entire goal here is to grab the GID of the project that has #websiteprojecttemplate within its Notes value. We need to find the …
Async and promise function do not display anything in my res.json call
I have a controller in javascript which should get a given user, and then the pets that are associated with the user. The related pets are stored in an array of object refs within the user schema. At the minute, when I try to res.json the resulting array containing the related pets, it outputs as an empty arr…
Passing parameters to Express middleware not working
I’m trying to create an input validation middleware using Express. My goal is to be able to pass 2 parameters to the middleware that validates client input. The problem is, after following multiple resources (including Express docs), my middleware seems to not be working. After calling the middleware, I…
Typescript development environment
I am starting with typescript. I started with an empty folder and ran these commands to set up my typescript development. then i made a tsconfig file I tried changing my output dir in tsconfig.json like “outDir”: “./dist”, But that doesn’t seem to work. the transpiled file is sti…
How to combine Date and Time from 2 different var’s in NodeJS
I have a User Input which consists of a Date and a Time Input. Both of those values are send as a full date like But i want to store it in my db as one single value like what is the best approach to achieve that ? split the strings on T and then combine or is there a
How can I delete a message after sending it?
I have a code that sends a message when a member joins the guild and I want to shortly delete it afterwards. My code: I tried embed.delete or just the classic msg.delete but it doesn’t work as I can/don’t know how to define “msg” as the last msg the bot has sent. Answer kanal.send(embe…
Slowmode command
When I type ;sm, my bot responds with: “You need to specify a time in seconds” <– Thats okay. But when I type ;sm [time], it still responds with: “You need to specify a time in seconds.”, but it should set the rate limit and tell me that “Slowmode is now [time]s”. …