Easily integrate YT Music with Discord and Slack using this repository, which includes both a browser extension and a Python script.
git clone "https://github.com/Captainexpo-1/YTMusicDiscordIntegration"
-
Supported Browser: Firefox
-
Steps:
- Navigate to
about:debugging#/runtime/this-firefox
in Firefox. - Click on "Load Temporary Add-on".
- Select the manifest.json file.
- Navigate to
-
Verification:
Open YT Music, play a song, and click the extension icon. A popup should display the current song information.
- Copy the example file:
cp .env.example .env
- Fill in the required environment variables in
.env
.- To disable Slack integration, set
ENABLE_SLACK=0
. - No changes are needed if only Discord integration is required.
- To disable Slack integration, set
python3 ./app/main.py
When the extension is active and a YT Music tab is open, a WebSocket server starts on port 54545
.
-
Current Song Information
{ "event": "song", "title": "string", "progress": { "current": "int", "total": "int" }, "channel": "string", "url": "string" }
-
Close Event
{ "event": "close" }
The script in app/main.py
listens to the WebSocket and sends the current song information to Discord and Slack (if enabled).
This project is licensed under the MIT License. See the LICENSE file for details.