Skip to content

TypeError: user.setNickname is not a function

so I have just finished this /setnick command for my Discord Bot, but I am getting the following error. I have tried looking for solutions on google and here on StackOverflow but I couldn’t find any regarding my problem. Does anyone know what the fix for this is? Here is the /setnick command file: Answe…

change value with AlpineJS

I’m making a website and learning AlpineJS. I’m trying to make a custom ‘checkbox’ (from tailwindcss) to make people agree to the Terms of Service. Now there’s probably already a better way to do this custom checkbox because now I’m replacing the entire checkbox when you cl…

how to replace some character with certain repeting regex

this is the log the output must be====>|~~X~~~X2~2~~22~2~~~~2~~~| here the code i’ve try: how to make /2/g just replace certain repeating i wanna make code above same function with this function duckShoot(ammo, aim, ducks) { } Answer or you can keep the ‘old’ replace with the regex wherea…

How to add vowel to arabic letter

How to add vowel to arabic letter from unicode/hexentity for example i have: U+FE8F ( ﺏ ) and want to add this vowel U+FE76 ( ﹶ ) -> ﺏﹶ U+FE8F ( ﺏ ) and want to add this vowel U+FE78 ( ﹸ ) -> ﺏﹸ I do it by js thanks in advance. Answer The Arabic script in Unicode has

How to zip two arrays object in Javascript [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 12 months ago. Improve this question I have two arrays object: Then I want the resulting array to be like thi…

How to retrieve Token for API calls in cypress

Due to a lack of knowledge in JS, I do face with below problem. I do automation testing with cypress and for external API endpoints, I need to use Dynamic Token that expires every 3600 secs. I did some short research and find out that, for reaching to JWT Token I will need 1st SSO login (that my app has).

Loop throught elements comparing previous values

I have a father div with X number of child divs. What I’m trying to do is to loop throught all the child elements and alternate some styles. For example (having 4 child divs) Child 1 style = nothing; Child 2 style = font-size: 24px; Child 3 style = nothing; Child 4 style = font-size: 24px; At the moment…