Avoid bug after double click

Hi everyone.

I would like to know how can I avoid double click a button on my simons game. I posted this question before but I did not understand the approach.

btnBlue.addEventListener("dblclick", avoidBug);

btnGreen.addEventListener("dblclick", avoidBug);

btnRed.addEventListener("dblclick", avoidBug);

btnYellow.addEventListener("dblclick", avoidBug);


function avoidBug(event){
  if (avoidBug){
    event.disabled = true;
  }else{
    event.disabled = false;
  }
}

I did this and many other approaches for hours and I can not find the result.

please, consider that I am new to this and trying to finish this project as soon as possible. This is the last bug I have to fix.