Spotify: Check if shuffle is enabled, and if not, turn it on

hi
im making buttons that play a playlist on Spotify in my touchbar.
is there script to:

  1. check if shuffle is enabled
  2. if not, turn shuffle on
  3. if it is on, do nothing.

then, how do I add it to this script?

tell application "Spotify"
    play track "spotify:playlist:5OApoLexWtYFcolEuLm9JK"
end tell

bump..

bumppp.

bump..

Imprint | Privacy Policy