{"id":28700832,"url":"https://github.com/shuyangzhang/kyouka","last_synced_at":"2025-06-14T11:41:39.104Z","repository":{"id":36971638,"uuid":"498843228","full_name":"shuyangzhang/Kyouka","owner":"shuyangzhang","description":"Kyouka is a simple and powerful music bot for KOOK(AKA KaiHeiLa), it is easy to use and develop.","archived":false,"fork":false,"pushed_at":"2022-11-19T10:37:19.000Z","size":178,"stargazers_count":73,"open_issues_count":3,"forks_count":25,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-03-03T21:46:13.232Z","etag":null,"topics":["bot","kaiheila","kaiheila-bot","kook","kook-bot","music-bot","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuyangzhang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-01T17:56:22.000Z","updated_at":"2023-03-01T15:22:00.000Z","dependencies_parsed_at":"2023-01-17T10:16:53.242Z","dependency_job_id":null,"html_url":"https://github.com/shuyangzhang/Kyouka","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/shuyangzhang/Kyouka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuyangzhang%2FKyouka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuyangzhang%2FKyouka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuyangzhang%2FKyouka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuyangzhang%2FKyouka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuyangzhang","download_url":"https://codeload.github.com/shuyangzhang/Kyouka/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuyangzhang%2FKyouka/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259811107,"owners_count":22915140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","kaiheila","kaiheila-bot","kook","kook-bot","music-bot","python"],"created_at":"2025-06-14T11:41:16.496Z","updated_at":"2025-06-14T11:41:39.097Z","avatar_url":"https://github.com/shuyangzhang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Kyouka 镜华 点歌机器人\n\n![GitHub last commit](https://img.shields.io/github/last-commit/shuyangzhang/Kyouka?logo=github)\n[![Release](https://img.shields.io/github/v/release/shuyangzhang/Kyouka)](https://github.com/shuyangzhang/Kyouka/releases)\n[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n[![khl server](https://www.kaiheila.cn/api/v3/badge/guild?guild_id=4648697392687523\u0026style=3)](https://kaihei.co/oHRMIL)\n![github stars](https://img.shields.io/github/stars/shuyangzhang/Kyouka?style=social)\n\nKyouka is a simple and powerful music bot for [KOOK](https://www.kookapp.cn/), it is easy to use and develop.\n\u003c/div\u003e\n\n## Multilingual README\n\nEnglish | [中文](./README_ZH_CN.md)\n\n## Contents\n\n- [Statement](#statement)\n- [Features](#features)\n- [Dependencies](#dependencies)\n- [Installation and Deployment](#installation-and-deployment)\n  - [Deploy based on docker service](#deploy-based-on-docker-service)\n  - [Deploy based on source code](#deploy-based-on-source-code)\n- [Usage](#usage)\n  - [Quick Start](#quick-start)\n  - [Commands](#commands)\n- [Development](#development)\n  - [Contributing](#contributing)\n  - [License](#license)\n- [Community](#community)\n- [Credits](#credits)\n\n## Statement\n\nThis repository is created just for learning python(Commercial prohibition).  \nAll the apis used in this repository are from public network. So, if you wanna to listen the paid songs,   \nplease open a paid member on corresponding music platform by yourself (respect the music copyright please).  \nFinally, if there are any infringements, please contact me to delete this repository.  \n\n## Features\n\n+ Multi platform\n+ All async\n+ Container as a service\n\n## Dependencies\n\n+ Docker, whether you are deploying based on docker or binaries.\n+ Python \u003e= 3.9, if you wanna to deploy it based on source code.\n\n## Installation and Deployment\n\n### Deploy based on docker service\n\nI highly recommend you to deploy based on docker because it is easy to configure.\n\n1. if you havn't install docker, please follow these instructions.\n\n- [Install Docker Desktop on Windows](https://docs.docker.com/desktop/windows/install/)\n- [Install Docker Desktop on Mac](https://docs.docker.com/desktop/mac/install/)\n- [Install Docker Desktop on Linux](https://docs.docker.com/desktop/linux/install/)\n\n2. check if your docker is ready.\n\n```bash\ndocker version\n```\n\n3. pull the [Kyouka bot image](https://hub.docker.com/r/shuyangzhang/kyouka) and [khl-voice image](https://hub.docker.com/r/shuyangzhang/khl-voice).\n\u003e Kyouka bot image provides multi-architecture support for `linux/amd64` and `linux/arm64`.  \n\u003e khl-voice image only support for `linux/amd64` arch.  \n\n\u003e If you are using `Windows/x86_64`, `macos/amd64`, `macos/arm64`, don't worry about that, you can also run images targeted for a different architecture on Docker Desktop.\n```bash\ndocker pull shuyangzhang/kyouka\ndocker pull shuyangzhang/khl-voice\n```\n\n4. copy the `.env.template` file from this repository or clone this repository, then rename it to `.env`.\n```bash\ngit clone https://github.com/shuyangzhang/Kyouka.git\ncd Kyouka\nmv .env.template .env\n```\n\n5. configure the `.env` file.\n\u003e WARN: Do not insert any useless characters (including spaces, comments) at the end of the lines of configuration items, otherwise it will cause json parsing failure.\n```bash\n# your bot token\nTOKEN=1/MECxOTk=/zCX2VjWr6p+AmD84jL9asQ==\n\n# default voice channel\nCHANNEL=2559449076697969\n\n# the name of khl-voice sdk container, it should be different with your manager(bot) container name\nCONTAINER_NAME=kyouka-runner\n\n# the admin user id list\nADMIN_USERS=[\"693543263\"]\n\n# the file_logger switch\nFILE_LOGGER=false\n```\n\n6. create container for Kyouka bot.\n```bash\ndocker run --name kyouka-manager --env-file .env -v /var/run/docker.sock:/var/run/docker.sock --restart always -d shuyangzhang/kyouka\n```\n\n7. now the bot in running, send a `/ping` command in your channel, if Kyouka reply you, that means your deployment is completed, enjoy!\n\u003e WARN: make sure that you have granted your bot read \u0026 send permissions.\n\n### Deploy based on source code\n\n\u003e if you are using `Win10`/`Win11`, I highly recommend you to run these scripts in WSL2.\n\n\u003e [How to Install Linux on Windows with WSL](https://docs.microsoft.com/en-us/windows/wsl/install)\n\n1. same to step 1 of `deploy based on docker service`, install docker and check if it is ready. \n```bash\ndocker version\n```\n\u003e make sure that you can run `docker` command without `sudo`. seeing [Manage Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)\n\n2. pull the [khl-voice image](https://hub.docker.com/r/shuyangzhang/khl-voice)\n\n```bash\ndocker pull shuyangzhang/khl-voice\n```\n\n3. make sure you have installed `Python`, and its version \u003e= 3.9\n\n\u003e [Download Python for your os](https://www.python.org/downloads/)\n\n```bash\npython -V\n```\n\n4. clone this repository, then rename `.env.template` file to `.env`.\n```bash\ngit clone https://github.com/shuyangzhang/Kyouka.git\ncd Kyouka\nmv .env.template .env\n```\n\n5. configure the `.env` file.\n\u003e WARN: Do not insert any useless characters (including spaces, comments) at the end of the lines of configuration items, otherwise it will cause json parsing failure.\n```bash\n# your bot token\nTOKEN=1/MECxOTk=/zCX2VjWr6p+AmD84jL9asQ==\n\n# default voice channel\nCHANNEL=2559449076697969\n\n# the name of khl-voice sdk container, it should be different with your manager(bot) container name\nCONTAINER_NAME=kyouka-runner\n\n# the admin user id list\nADMIN_USERS=[\"693543263\"]\n\n# the file_logger switch\nFILE_LOGGER=false\n```\n\n6. install python dependencies.\n\n```bash\n# install vritualenv and initialize a venv for your bot\npip install virtualenv -i https://pypi.tuna.tsinghua.edu.cn/simple\nvirtualenv venv\n\n# activate venv\nsource venv/bin/activate\n\n# install dependencies\npip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple\n```\n\n7. run the Kyouka bot.\n```bash\npython startup.py\n```\n\n8. now the bot in running, send a `/ping` command in your channel, if Kyouka reply you, that means your deployment is completed, enjoy!\n\u003e WARN: make sure that you have granted your bot read \u0026 send permissions.\n\n## Usage\n\n### Quick Start\n\nsend a `/help` command in you channel, Kyouka will teach you how to use.\n\n### Commands\n\n- `/ping`: check whether Kyouka is alive.\n- `/help`: get usage from Kyouka.\n- `/debug`: (only for admin) the debug switch.\n- `/comehere`: bind the voice channel you are in.\n- `/channel {channel_id}`: bind the voice channel with id.\n- `/play {music_name}`: add a music to play list.\n- `/search {keyword}`: search music by keyword from netease cloud music.\n- `/msearch {keyword}`: search music by keyword from migu music.\n- `/qsearch {keyword}`: search music by keyword from qq muisc.\n- `/osearch {keyword}`: search music by keyword from game osu!.\n- `/select {search_list_id}`: select a music from search result, then add it to play list.\n- `/bilibili {bilibili_video_url}`: add a video from Bilibili to play list.\n- `/list`: check the play list.\n- `/cut`: play the next music in play list.\n- `/playlist {playlist_url}`: import a netease cloud music play list to Kyouka.\n- `/radio {radio_url}`: import a netease cloud music radio list to Kyouka.\n- `/album {album_url}`: import a netease cloud music album to Kyouka.\n- `/remove {list_id}`: remove a music from play list.\n- `/top {list_id}`: place a music at the top of play list.\n\n## Development\n### Contributing\n- using the issue tracker  \nUse the issue tracker to suggest feature requests, report bugs, and ask questions. This is also a great way to connect with the developers of the project as well as others who are interested in this solution.\n\n- changing the code base  \nGenerally speaking, you should fork this repository, make changes in your own fork, and then submit a pull request. All commit messages should satisfy [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)\n\n### License\nThis project is licensed under the terms of the [MIT license](./LICENSE).\n\n## Community\nIf you need help, have any comments and suggestions, or want to develop Kyouka together, feel free to join our official community: https://kaihei.co/oHRMIL\n\n## Credits\nThis project is all based on [khl.py](https://github.com/TWT233/khl.py)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuyangzhang%2Fkyouka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuyangzhang%2Fkyouka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuyangzhang%2Fkyouka/lists"}