Skip to content

Commit

Permalink
chore: update for new lavalink format
Browse files Browse the repository at this point in the history
  • Loading branch information
0t4u committed Aug 25, 2024
1 parent 6d832a4 commit d467ee6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/content/docs/4.1.0/guides/3-common.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Steps } from '@astrojs/starlight/components';
```
4. Tell Lavalink to play the searched track.
```js
await player.playTrack({ track: metadata.encoded });
await player.playTrack({ track: { encoded: metadata.encoded } });
```
5. After 30 seconds, tell Lavalink to leave the voice channel.
```js
Expand All @@ -42,7 +42,7 @@ import { Steps } from '@astrojs/starlight/components';
Here we are changing the volume, you can do [other stuff](/4.1.0/api/classes/player#methods) as well.
```js
await player.playTrack({ track: metadata.encoded });
await player.playTrack({ track: { encoded: metadata.encoded } });
await player.setGlobalVolume(50);
```
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/4.1.0/guides/6-updating-from-v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Play the track using the encoded metadata.

```diff
-player.playTrack({ track: metadata.track })
+await player.playTrack({ track: metadata.encoded });
+await player.playTrack({ track: { encoded: metadata.encoded } });
```

### Leaving voice channels
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/guides/3-common.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { Steps } from '@astrojs/starlight/components';
```
4. Tell Lavalink to play the searched track.
```js
await player.playTrack({ track: metadata.encoded });
await player.playTrack({ track: { encoded: metadata.encoded } });
```
5. After 30 seconds, tell Lavalink to leave the voice channel.
```js
Expand All @@ -39,7 +39,7 @@ import { Steps } from '@astrojs/starlight/components';
## Playing a track and changing a playback option
Here we are changing the volume, you can do [other stuff](/api/classes/player#methods) as well.
```js
await player.playTrack({ track: metadata.encoded });
await player.playTrack({ track: { encoded: metadata.encoded } });
await player.setGlobalVolume(50);
```
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/guides/6-updating-from-v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You can also use the player.node property after connecting to a voice channel to
Play the track using the encoded metadata.
```diff
-player.playTrack({ track: metadata.track })
+await player.playTrack({ track: metadata.encoded });
+await player.playTrack({ track: { encoded: metadata.encoded } });
```

### Leaving voice channels
Expand Down

0 comments on commit d467ee6

Please sign in to comment.