Skip to content
Advertisement

Tag: node.js

How to wait for new information from a node.js server

so i am making a small chat lobby project. But im having issues with getting the messages people are sending to the server, back to the clients to show them on the site. It kind of worked using a loop like this: However this is obviosly really bad, and if you started spamming, or too many clients joined, it overloaded

discord bot replies 1 to 2 times

i am currently working on this discord bot but when i call a command it responds twice. would anyone know how to fix this? Answer Have you tried shutting down all other processes of your bot (Google Cloud, AWS …)? The bot could login twice and act like 2 bots, replying twice to the command Happened to me once

Set checkbox label’s text in modal

I have a modal for creating new post. I want to allow the user to select departments for sharing so I’m using checkboxes for choosing the audience. HTML: Different users have different departments to be shown and they are saved in mongoDB user document. I need to set the labels of the checkboxes on loading the modal. I’m getting user’s

Why I got Illegal arguments error with simple hash function?

This is my code I run I expected hashed password. Why does terminal point to illegal arguments? Answer In an object literal, password : bcrypt.hash(this.password, salt) calls bcrypt.hash and assigns its return value to the password property. In the code you’ve shown, this doesn’t refer to the object being created, it refers to the same thing this refers to where

Webpack 5 and ESM

I think I’ve read every thread on SO and every related page on the internet on this, everything has some variation of a problem I want: To use webpack to bundle my web app up To use ES Modules within my source js and have them transpiled down for wider browser support To use ES Modules within my webpack configuration

Discord: Get User by Id

I’m trying to create a web application to manage the users of my Discord server. In my database, I have stored only the users’ ids. I tried to use the discord.js API, but from what I’ve understood it requires a discord bot to do that. That’s not what I want. I would like to retrieve the user’s information from my

Advertisement