#Please Explain This Stupidity - ButtonComponent and modifying existing buttons (on messages)

1 messages · Page 1 of 1 (latest)

jolly axle

Hello. I use typescript

I would like to know... Why Can't I Simply Modify An Existing Message's Buttons? As shown in the picture attached, I am trying to disable a button after it has been clicked in a tic-tac-toe game. However, const button returns a ButtonComponent, which doesn't allow me to disabled the button due to 1. no .setDisabled() function and 2. the .disabled property being read-only. Thus, leaving me only with the option of creating a whole new god damn actionrow just to modify a single button, which is very frustrating. Is there way to convert the ButtonComponent into a builder instead or...? I'm so lost

This is not a typescript issue; I used ts ignore on it and it stilled errored saying the disabled value is a getter
Would someone please assist me because This Isn't The First Time I've Came Across This Exact Scenario

Everything else works fine... For Now.