We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
前提:已安装screen curl python3等,已在腾讯云Ubuntu 22.04 LTS上成功运行。
安装apt install的node在安装依赖时会出问题,需要通过
apt install
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs
安装nodejs。
MiguMusicApi
QQMusicApi
NeteaseCloudMusicApi
npm install
只要确保能在工作目录下使用ffmpeg即可。 如使用apt安装
sudo apt install ffmpeg
仓库提供的run.sh并不能一次全部将所需api启动,需要将前一个进程结束才会启动下一个。这里使用screen魔改了一下。
run.sh
#!/usr/bin/env bash echo "========================" echo "-start Strat the bot." echo "-stop Stop the bot." echo "========================" echo "" function start(){ screen -dmS KO-ON-scheduler python3 scheduler.py echo "Start KO-ON-scheduler." cd MiguMusicApi screen -dmS KO-ON-MiguMusicApi npm start cd ../ echo "Start KO-ON-MiguMusicApi." cd QQMusicApi screen -dmS KO-ON-QQMusicApi npm start cd ../ echo "Strat KO-ON-QQMusicApi." cd NeteaseCloudMusicApi screen -dmS KO-ON-NeteaseCloudMusicApi node app.js cd ../ echo "Start KO-ON-NeteaseCloudMusicApi." screen -dmS KO-ON-core python3 core.py 1 echo "Start KO-ON-core." } function stop(){ screen -S KO-ON-scheduler -X quit echo "Stop KO-ON-scheduler." screen -S KO-ON-MiguMusicApi -X quit echo "Stop KO-ON-MiguMusicApi." screen -S KO-ON-QQMusicApi -X quit echo "Stop KO-ON-QQMusicApi." screen -S KO-ON-NeteaseCloudMusicApi -X quit echo "Stop KO-ON-NeteiaseCloudMusicApi." screen -S KO-ON-core -X quit echo "Stop KO-ON-core." } running=0 if (( $(screen -ls | grep -c -P '^\t\d+\.KO-ON-(core|NeteaseCloudMusicApi|QQMusicApi|MiguMusicApi|scheduler)\t') > 0 )); then # screen names KO-ON is running. running=1 fi if [[ $1 == "-start" ]]; then if [ $running == 1 ]; then echo "KO-ON is running. Stop it then restarting." stop start echo "Done." else start echo "Done." fi elif [[ $1 == "-stop" ]]; then if [ $running == 1 ]; then stop echo "Done." else echo "KO-ON didn't run." fi else echo "Toggle KO-ON run/stop" if [ $running == 1 ]; then stop else start fi fi
不出意外的话,运行./run.sh后就会出现五个screen。
./run.sh
The text was updated successfully, but these errors were encountered:
成功部署
Sorry, something went wrong.
成功部署 zmq問題請看這個 https://github.com/KkemChen/KO-ON-BOT
No branches or pull requests
安装nodejs
安装
apt install
的node在安装依赖时会出问题,需要通过curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs
安装nodejs。
安装依赖
MiguMusicApi
、QQMusicApi
、NeteaseCloudMusicApi
,使用npm install
安装node依赖。安装ffmpeg
只要确保能在工作目录下使用ffmpeg即可。
如使用apt安装
启动脚本
仓库提供的
run.sh
并不能一次全部将所需api启动,需要将前一个进程结束才会启动下一个。这里使用screen魔改了一下。The End
不出意外的话,运行
./run.sh
后就会出现五个screen。The text was updated successfully, but these errors were encountered: