Skip to content

Tag: javascript

Small discord.js Avatar image

Avatar issue example I am trying to do the discord.js avatar command and it works. It sends the image it needs to send but the issue is that the image sent is small compared to other bots. Am using the command handler in the discord.js guide Answer You can add a size option like how you did with you format

How to use click event on bootstrap modal

I generate many bootstrap modals with a php script, and I’d like to edit some input of it when I click button “save changes”. ModalIDs generated are something like “ModalID0000”. But nothing happens with my script when i click on “save changes”. EDIT : 1st mistake fou…

jasmine.createSpyObj with properties

When mocking dependencies in my Angular tests, I usually create a spy object using jasmine.createSpyObj: then provide it to the TestBed: When I use it in my test, I can then specify the desired return value: Now I also need to mock properties and I cannot find out how it should be done. createSpyObj does allo…

How to change shared state in Alpine.js?

I’m trying to hide multiple elements inside the DOM by changing shared state when window is resized. And when i try to It should change the state ** hideOnMobile** to true but it doesn’t somehow any idea? Answer Have you tried using @resize.window? (ie. adding the resize listener using Alpine.js) …