- auto run the iTunes
- NodeJS >= 10.15.3 (Not Recommend 12)
- create
.env
file
USER_TOKEN=YOUR DISCORD TOKEN HERE
APP_CLIENT_ID=YOUR DISCORD APPLICATION CLIENT ID HERE
-
npm install
-
npm run build
-
npm run start
just npm run removeAssets
-
npm run pkg
-
vim itunes-rpc.sh
cd $YOUR_ITUNESRPC_DIRECOTRY
./build/itunes-rpc/itunes-rpc
-
chmod +x itunes-rpc.sh
-
vim ~/Library/LaunchAgents/local.itunesrpc.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.itunesrpc</string>
<key>ProgramArguments</key>
<array>
<string>$YOUR_ITUNESRPC_DIRECOTRY/itunes-rpc.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
launchctl load ~/Library/local.itunesrpc.plist
if you want unload launchctl, input launchctl unload ~/Library/local.itunesrpc.plist