Skip to content

Tag: javascript

How to make bot Whent, the bot

I have this code but I have errors Answer You have few errors in code, first addField method takes 2 parameters, and both are type of string, setFooter also. client.users.get(“404968772969955329”).send(yumz) grabs user(visible by bot) with id 404968772969955329 and sends him a direct message, so i…

Call Function From Solidity With Web3

I am having trouble calling a simple function from my solidity contract. Here’s how the code is structured so far: In my web3Api.js file I have: Then in my projectApi.js file I have: Note: When I call the global variable throughout this file it successfully returns all my contract’s functions So t…

Dynamic Import Node Module With Next.js

I was getting an error of window undefined when using react-leaflet node module because it relies on window and of course SSR does not support window. I found next/dynamic, however, all the examples I found show how to import a component and not a node module. Is it possible to include a node module and if so…

Adding a greeting to a React App based on the time of day

I’m just starting out with React and I am trying to implement a greeting in which the user gets a different greeting based on the time of day. I’m familiar with the JavaScript function to do this, I’m just not sure how to directly insert it into my code. This is my navbar component that I ha…