it still crashed because you might have not closed discord entirely, as you probably pressed the X button in the discord app instead. thats just how discord behaves apparently, it "minimizes" itself to the system tray instead of closing itself when the X button is pressed.
How to close Discord
this video should help you on how to actually close discord instead of just "minimizing" it