Skip to content
Advertisement

Tag: node.js

Unable to remove data from json file on disk

I’m unable to find a way to remove whole line of JSON data(line) after it’s used. For some reason delete is not working or rather said not doing anything. .JSON code The goal here is to select random code, which is done but then I need to remove it from .JSON file so it won’t repeat. I tried several things

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: Answer Should be

Problems playing audio files in Discord

So, It’s been two long days traying to figure what the reck is going on… I’m creating a Bot to my Discord Channel that plays an audio.mp3 when a command is written, like !laugh then the bot should enter the voice channel and reproduce laugh.mp3. I’ve tried in so manny different ways but the bot keeps entering the channel, the

There was an error deploying functions. Failed to update function app in region us-central1

This is my first time trying to deploy a function firebase function. I’ve written an API and I want to create a firebase function and use it. In my project everything works on localhost and even worked when I did firebase serve –only functions, hosting. Since I’m only using hosting and functions I didn’t do the initializeApp(firebaseConfig) thing of firebase

How to access items metadata in Stripe checkout session

When I create a Checkout session, I am creating prices on the fly with price_data and product_data properties. For each item, I am putting metadata in the product_data.metadata property. After payment is successfully finished, I fetch the session data in order to display Payment Successful page to the customer. But for some reason, metadata of the items are empty. Metadata

How to find index of ‘items_tolookfor’ array of items in another nested Array List ‘nested_data’ in javascript

How to find index of ‘items_tolookfor’ array of items in another nested Array List ‘nested_data’ in javascript How would I find indices for ‘items_tolookfor’ in the nested array list ‘nested_data’ Also, the corresponding data lies in the nested list ‘nested_data’ index[2][5] I was trying this code: Expected result to be a console log output array with matching data for items_to_look_for

Advertisement