Skip to content

Tag: javascript

Vanilla JS to dynamically add or remove div boxes

When checking on the checkbox i’m trying to create the div boxes and when unchecking remove it dynamically. I know with React i could do this in 2min but i’m trying to learn Vanilla JS way Current issues i’m having: When checking on checkbox it renders more elements than one When unchecking …

Access Messages from Message Center

Hi I’m try to display the top 5 messages from the message center on the homepage. But I’m not sure what I’m doing wrong. I try to get the messages from the message view model here is my code. View model MessageViewModel.cs Controller Cshtml Answer To display top 5 records, we should use the “OrderByDesc…

Why is this promise returning undefined?

I am trying to write a simple function like this and I have made a firebase helper like this however, league is logging out as undefined and in here is logging out second. however, I thought it would be the other way around? I thought it would “await” for this function to resolve then once it&#821…

Discord.JS How to wait for member reaction

I am making bot to manage my multiple Discord guilds. And I’d like to make confirmation system, like: User does X thing, Bot sends message in sufficient channel, Bot waits for user to react with :thumbdsup: or :thumbsdown: up to 60 seconds If thumbs up, do A, else – do B. If time is up, do C actio…