Skip to content

Category: Questions

I can’t edit a message from discord.js bot

I want to make a countdown timer that uses a command /timer minutes seconds where the user chooses how long the countdown will be. I want the bot to send the timer as a reply to the command which I’ve successfully done. However, I also want the message to update along with the timer. I can console.log t…

How to count values without the duplicate in react

Language used : js with react I need to count how much “theme” I have but not if he’s already count/exist data example : Here, i have two theme : love and horror. I know how to get the number of theme but i don’t want to count the duplicate, so here i only want to get “2” a…

In PSPDFKit how do I get highlighted text?

There is an older response to this question in How can I get the highlighted text from PSPDFKit? but all the links are dead and the solution may have been refactored drastically since 2014. All I get from the response from instance.exportInstantJSON() is the coordinates of a rectange annotation of my highligh…

Replace (fix) non UTF-8 character in string

When I am parsing a string to become a JSON object there are some special characters that are replaced with the black question mark (�), I believe that is an issue with the encoding of the character. Is there any way of replacing the question mark with the correct character (é) or is it lost? Answer From the …

How to read the content of an Axios post response?

When I send the same POST request with a cURL command, I get this as response: When I add the POST request in my code and print it with console.log(“response: “, response); or console.log(“response: “, response.data); , I get this printed How can I see the content of the response print…