I’m trying to get all users connected to a voice channel on my server. When someone talks to a bot in #general, I want to get the users inside Voice Channel 1. I’m using Node 17 and DiscordJS 13. This is my code: Also, I tried this one: But, it always returns the voice channel users that joined wh…
Randomize assigned colors in an array in p5.js
I have been trying to recreate one of Vera Molnar’s paintings, and to add a twist, I wanted to randomize the colors in the array as I drag my mouse over the canvas. However, I cannot for the life of me figure out how to do this. Below is one of many attempts at this. What could I be doing
How do I convert this code so the functions can take a variable?
I am trying to change the color of nav bar elements when the mouse goes over them. This piece of code does that but for only the first button: I have been trying to convert the code so the functions work for multiple buttons, but cannot seem to get it to work. Here is the code so far: It has
React-Hook Form with useFieldArray: TextField value does not show up in the console. How can I fix it?
I wanted to enter the word Product but when I submit it, it does not show up in the console. What shows up in the console: As you can see here, the word Product does not appear in the console. Any idea on how I can solve this? This is the codesandbox link: https://codesandbox.io/s/react-hook-form-usefieldarra…
How to Inject new element in SlateJS Editor DOM
How to inject new react component/element into SlateJS Editor DOM? I want to inject a new element within the SlateJS editor’s DOM, not above or below. Most of SlateJS’s examples would transform nodes, but it doesn’t allow for direct injecting into the SlateJS DOM. That is within the editor c…
Modifying an existing CodePen Galaxy affect (Zoom out to Zoom In)
so recently I have found this awesome galaxy effect on codepen: https://codepen.io/zeztron/pen/MPNxxR I tried to modify the JavaScript and couldn’t figure out a way to change it so instead of it feeling like Zooming out, making it to feel like Zooming in. Can anyone help? Thank you!! Here are the codes:…
Data export using react-data-table-component export csv
I am new to React. I am trying to export JSON data that is displayed using the ‘react-data-table-component’ to a CSV file. I have followed the example from this link by copying the exact code snippet provided. Below is my code snippet and the corresponding error occurring during compilation. Could…
setting width, height via setAttribute for a grid of divs – Etch-a-sketch. Style resets when hovered over
I’m quite new to coding. I’m coding an Etch-a-sketch (via the Odin Project). Basically, it consists of a grid, which when hovered over, the boxes of the grid will change to a random color. (the container is supposed to keep the same dimensions) Upon loading the page, it starts with a basic grid of…
How do you arrange shapes in React Native?
I am attempting to arrange squares just like how they look in the image, but I can’t really figure out the whole flex and positioning stuff: squares This is probably really simple but I just can’t figure it out. Answer Well, here is a quick and dirty version of your picture. which yields to the fo…
How to Accept style suggestions of a google doc with Google Doc API?
As title, in this post I already know how to retrieve all-suggestion-accepted content of a document. Now I also want to retrieve the “style suggestion” of the content of the document. I’ve referred to the second half part of this guideline, but still have no clue about it. Below is the snipp…