im working on a telegram bot using the telegraf package. (version 4.1.1) everything was working until i started using more modules from the telegraf package like Extra and mark-up. I started getting this error: ‘typegram/callback’ is installed but is a typescript file,i don’t have typescript…
Tag: node.js
getting 302 when changing from local host to a proxy in puppeteer + Charles
so am using Charles’s external proxy setting and using puppeteer, the problem is when i put the proxy server in puppeteer as an local host every thing work fine and normally but when i close Charles and use another authenticated proxy the server return a statues of 302 and redirect me, i checked out the…
Replace Unicode from each output of NodeJS – Code optimization
I am reading data from a serial port and with test case capturing the required output, then this output is sent to html now while reading from serial port, there are few unicode charachters in the output. I can remove them by using there are approx 50 places where I need to use this replace and trim method, s…
How do I use an API in Discord.js?
I was looking for a cool way I could automate some interesting news articles on my discord server. I wanted to use webhooks at first but then decided to go with APIs. I looked all around and saw that I should go with New York Times API but when I went to code it, it came up with a few
How to set outerHTML with using of cheerio
could someone answer me, how to properly set outerHTML of element by using cheerio. I have a problem with that. Example: Let’s say I have an HTML structure below Parsing it via cheerio and adding some manipulations As a result I expect to have all divs to be replaced with p. But only spans are replaced …
How do I get Info from an Array into a message?
I’m storing some info in an array like this: I want to send a message from the bot back to the user with all the names in the array. How do I go about doing this? Normally, I would use a for loop to cycle through for comparisons and such but I don’t want to send multiple messages. Just want
hi i’m using react-native and react-navigation
when i try to navigation.navigate this error occure Cannot read property ‘navigate’ of undefined this is my code when i try to navigation.navigate this error occure Cannot read property ‘navigate’ of undefined this is my code card.js navigator.js i don’t know how can i resolve…
How can I owner lock this command in discord.js v12?
I’m trying to make this command so only I can run it, no luck so far. I tried using and When I used the first one, the command worked but everyone was able to run it, and when I used the second one no one was able to run it at all. I don’t get any error logs nor crashes.
Plot histogram in ReactJS
Suppose I want to plot histogram for time taken to read each book. I calculated time to read each book and stored in an array as As I gone through different methods on how to plot histogram …. I found that to display data , it should be in range as: But on basis of my previous data how can
Not able to route some sites with ejs
I’m working on my side structure and tried to add multiple single pages. Here is my site structure: bin node_modules public query routes – index.js views -menu –menu1.ejs –menu2.ejs –menu3.ejs -…