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…
TypeScript function that works on all numerical array types
I am trying to write a function that works on all of the JavaScript array types, e.g. on number[], Float32Array etc. It should return the same type that it gets as a parameter. A simple example would be: The function should be able to use all methods common to all array types (not just map). I also tried but …
Sweet alert 2 modal with input type range issue
is there any way to customize the output next to the input (type range) showing the value of the input? i want it to show the value + %. What i tried so far is to give the input a customclass and then get its <output> tag and tried to manipulate its inner text like this : with no particular
Why is 5726718050568503296 truncated in JS
As per the standard ES implements numbers as IEEE754 doubles. And per https://www.binaryconvert.com/result_double.html?decimal=053055050054055049056048053048053054056053048051050057054 and other programming languages https://play.golang.org/p/5QyT7iPHNim it looks like the 5726718050568503296 value can be repr…
Vuex Method-style Access Getters
I am having a bit hard time understanding the following JS: These two code snippets are taken from official Vuex Documentation on Method Style Access for Getters. Now what I dont understand is, how those the second part of code output the value in the comment? Maybe I miss-understood JS functions? I believe t…
Loop through an object by not using two for loops
I am trying to loop through an object and get the values of the properties using two for loops. I get the output as expected, but was wondering if there is a better way to do this which would prevent using two for loops. Any suggestions? (thanks for the help earlier @cybercoder) Answer You can achieve this by…
A lookup function to match the same IDs in two different arrays of objects and inserting key/value pairs into one of the array of objects
I have 2 different arrays with objects. I want to be basically match an ID from both of the array of objects and then basically take the key value pair from the matching object and add it to the other array’s object. For example this is one of the array of objects The second array would look something l…
How To identify which Div is displaying the scrollbar
My dashboard app is a single page – never longer than 100vh. In a certain place, when I click a button, some unknown container temporarily overflows and a scrollbar appears on the right side, and then one second later it disappears. During that one second, the page background jumps very noticeably. I wi…
Using how would I pass data to another html page without opening the page
I have a RSVP form that I just want to store that data into a list on another html page called rsvplist.html without opening the page rsvplist.html I am only using rsvplist.html as a way to store what people are submitting. I currently do not have any JavaScript yet because I am not sure how to best approach …