Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
Migrate from yandex-music-client api to ym-api-meowed api.
Update plugin to support Distube V5.
Refactored music types.
  • Loading branch information
AlexInCube committed Jun 25, 2024
1 parent 0309746 commit b5aa672
Show file tree
Hide file tree
Showing 6 changed files with 1,568 additions and 1,262 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
A DisTube custom plugin for supporting Yandex Music URL.
Created by [AlexInCube](https://vk.com/alexincube)

## Warning

If you want to use it with Distube v4, install v0.2.1 version of this plugin.
Version 1.0.0 works only with Distube v5.

## Feature

This plugin grabs the songs on Yandexmusic and plays with DisTube.
Expand All @@ -23,7 +28,8 @@ Examples of supported links:
- Albums https://music.yandex.ru/album/5307396
- Playlists https://music.yandex.ru/users/alexander.tsimbalistiy/playlists/1000

If you have some troubles, please create an issue
If you have some troubles, please create an issue.
You need the Premium Subscription in Yandex Music if you want to use this API outside Russia VDS

## Installation

Expand All @@ -33,14 +39,18 @@ npm install distube-yandex-music-plugin@latest

## Usage

```js
```ts
const Discord = require("discord.js");
const client = new Discord.Client();

const { DisTube } = require("distube");
const { YandexMusicPlugin } = require("distube-yandex-music-plugin");

const distube = new DisTube(client, {
plugins: [new YandexMusicPlugin()],
plugins: [new YandexMusicPlugin({
oauthToken: "your_token",
uid: "your_uid"
})],
});
```

Expand All @@ -49,10 +59,6 @@ const distube = new DisTube(client, {
### YandexMusicPlugin([YandexMusicPluginOptions])

- `oauthToken:`: Required for using Yandex API. You can retrieve token by following this [guide](https://github.com/MarshalX/yandex-music-api/discussions/513)
#### Example
- `uid:`: Required for using Yandex API. You can retrieve uid by opening [Yandex Mail](https://mail.yandex.ru) and copy uid from url in address bar.

```js
new YandexMusicPlugin({
oauthToken: "YandexMusicToken"
});
```
Token and UID must relate to one account
18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "distube-yandex-music-plugin",
"version": "0.2.1",
"version": "1.0.0",
"description": "A DisTube custom plugin for supporting Yandex Music.",
"main": "./dist/YandexMusicPlugin.js",
"types": "./dist/YandexMusicPlugin.d.ts",
Expand Down Expand Up @@ -29,21 +29,17 @@
"music"
],
"author": "AlexInCube",
"bugs": {
"url": "https://github.com/distubejs/spotify/issues"
},
"homepage": "https://github.com/AlexInCube/distube-yandex-music-plugin#readme",
"devDependencies": {
"discord.js": "^14.11.0",
"eslint": "^8.45.0",
"tsup": "^7.1.0",
"typescript": "^4.9.5"
"discord.js": "^14.15.3",
"eslint": "^8.57.0",
"tsup": "^7.2.0",
"typescript": "^5.4.5"
},
"dependencies": {
"axios": "^1.4.0",
"yandex-music-client": "^0.4.3"
"ym-api-meowed": "^1.3.4"
},
"peerDependencies": {
"distube": "^3.3.1||4"
"distube": "^5.0.0"
}
}
Loading

0 comments on commit b5aa672

Please sign in to comment.