Skip to content
Advertisement

Tag: node.js

Search for regex terms independent of symbol

So I have this string right here, it’s a registration number: 12.325.767/0001-90 And I want to create a regex when I type “23”, return for me the “2.3” or if I type “700”, return for me “7/00” or if I type “19”, return “1-9”. So, I want to get the number even if there is a symbol in the middle.

Discord bot loading but commands are not working

I’m making my first Discord bot and I’m following this tutorial playlist here: https://www.youtube.com/watch?v=j_sD9udZnCk&list=PLbbLC0BLaGjpyzN1rg-gK4dUqbn8eJQq4&ab_channel=CodeLyon But for some reason my bot will load, say the load message, and even set its custom status but none of the commands are working. I have looked at many other forum posts and none are my problem so I’m very confused. I’m using Discord.js 14.3.0

Cannot set headers after they are sent to the client bug with Express and node-postgres

I’m stuck with the issue of sending response back to the caller after retrieving something from Postgres database. It appears that headers are automatically written after fetchUserDB is executed (regardless of its success). This leads to the error ERR_HTTP_HEADERS_SENT when I try to return the response back using res.json() menthod. These are the headers after fetchUsedDB is called (just before

Advertisement