Skip to content

Tag: node.js

how can i move users with reaction

im trying to create bot that move users when they react in message create channel and move the user to the channel that was created , err = Cannot read property ‘setChannel’ of undefined Answer You need a GuildMember to access their voice state. Your mem variable is wrong so, you need to get the m…

Promise resolving too early

I’m having an issue where my Promise.all is resolving too early. For a test I want to console.log the length of the array which is getting pushed from within the promise map but it is returning 0 sadly. I’m sure it’s something simple… Any help would be greatly appreciated. Answer There…

activities of bot update informations

I put it in the status to show how many members are online of the total number, but it does not update the real number, only when the bot is restarted, is there any way that when this activity arrives, the information appears with the new data? Answer You need to regenerate the Strings in the Array every run:

node js send token through the header

i try to send token use header, (login form to index page use the header) my index file is the page redirect index page ,but the token not send the index page Answer If I understood you correctly, you expect that the authtok header will be set by the browser when a request to /index page is made. Headers are

Decrypt the crypto data

I am trying to encrypt and decrypt values using node inbuild module crypto. I have followed this tutorial to encrypt the data. They haven’t to gave any sample code to decrypt. When I try to use other tutorial code to decrypt the data. It not working out. Please help me out, Code Answer Since you havent …

resolve and reject issue using node js

Is this possible way to return resolve or reject message from one function to another? As I am writing to pass resolve message in postman whenever my task is completed or reject message when there is some error But after after writing return it still not returning the resolve message or reject message inside …