Skip to content

Conversation

@Droid00000
Copy link

Summary

So, this is my attempt at documentation. I mainly attempted to reference the docs for LavaSrc and the SponsorBlock plugin. If there's anything that's incorrect, please feel free to let me know. I'll attempt to correct it.

Copy link
Owner

@topi314 topi314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not bad for a start, but I prefer to have tables with field descriptions, feel free to link to https://lavalink.dev for common types

README.md Outdated
> [!IMPORTANT]
> This plugin is compatible with Lavalink version four and higher.

A plugin that adds a queue system for [Lavalink](https://github.com/lavalink-devs/Lavalink).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple queue plugin for LavaLink with a REST API.

README.md Outdated
Comment on lines 32 to 34
* `normal`
* `repeat`
* `track`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a table with descriptions

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md Outdated
Comment on lines 44 to 58
Response:

```json5
{
"type": "normal",
"tracks": [
{
"encoded": "...",
"info": "{}",
"pluginInfo": "{}",
"userData": "{}"
}
]
}
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

responses should have a table and then a <details> with a json example

@Droid00000
Copy link
Author

Droid00000 commented Feb 3, 2025

Alright, I've added tables and descriptors for types and their custom objects, as well as wrapped the JSON examples in <details>. I wasn't sure if I needed to add examples for every response since most of them are just standard Lavalink objects. But, I can do that as well.

@Droid00000 Droid00000 requested a review from topi314 February 3, 2025 02:13
README.md Outdated
Comment on lines 10 to 23
* [Installation](#installation)
* [API](#api)
* [Get Queue](#get-queue)
* [Update Queue](#update-queue)
* [Next Queue Track](#next-queue-track)
* [Previous Queue Track](#previous-queue-track)
* [Add Queue Track](#add-queue-tracks)
* [Update Queue Track](#update-queue-tracks)
* [Get Queue Track](#get-queue-track)
* [Add Queue Track](#add-queue-track)
* [Delete Queue Track(s)](#delete-queue-track(s))
* [Move Queue Track](#move-queue-track)
* [Get Queue History](#get-queue-history)
* [Get Queue History Track](#get-queue-history-track)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if something is a sub header it should be indented
the events are missing in here too

README.md Outdated

---

### Queue Types
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in 98c97f9 i renamed queue type to queue mode

README.md Outdated
Comment on lines 52 to 57
### Common Types

| Type | Description |
|-------------------------------------------------------------------------------|-----------------------------------------------------------|
| [track](https://lavalink.dev/api/rest.html#track) | A track object returned in API responses. |
| [update_player_track](https://lavalink.dev/api/rest.html#update-player-track) | An update player track that can be sent in API requests. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just link where they are actually used to the lavalink docs

README.md Outdated
| Field | Type | Description |
|--------|--------|-----------------------------------------|
| type | string | the type of queue. |
| tracks | array | An array of track objects in the queue. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you should link to the lavalink docs track object https://lavalink.dev/api/rest.html#track
type should be array of [Track](https://lavalink.dev/api/rest.html#track) objects

README.md Outdated

| Field | Type | Description |
|--------|--------|-----------------------------------------|
| type | string | the type of queue. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to mode and you should link to the queue mode types here

README.md Outdated
{
"encoded": "...",
"info": "{}",
"pluginInfo": "{}",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pluginInfo isnt a string

README.md Outdated
"encoded": "...",
"info": "{}",
"pluginInfo": "{}",
"userData": "{}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

userData isnt a string

README.md Outdated
Comment on lines 89 to 91
## API

The plugin provides a REST API to add, remove, and update tracks in the queue.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be above the common types

Comment on lines 114 to 127
<details>
<summary>Example Payload</summary>

```json5
{
"type": "normal",
"tracks": [
{
"encoded":"QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd"
}
]
}
```
</details>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no table?

README.md Outdated

### Get Queue Track

Gets a track from the queue at the specified index. Response is a track object.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response should be listed below and link to the lavalink docs

@Droid00000
Copy link
Author

Alright, I've tried to make the changes you've asked.

@Droid00000 Droid00000 requested a review from topi314 February 3, 2025 21:26
@topi314
Copy link
Owner

topi314 commented Feb 3, 2025

if you solved something feel free to mark it as resolved

Copy link
Owner

@topi314 topi314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the following structure would fit better:

  • Installation
  • API
    • Common Types
    • Endpoints
      • ...
    • Events
      • ...

README.md Outdated
Comment on lines 86 to 89
| Type | Description |
|---------------------------------------------------|-----------------------------------------------------------------------------------------------|
| [track](https://lavalink.dev/api/rest.html#track) | A track object returned in API responses. |
| update_queue | An array of [update player track](https://lavalink.dev/api/rest#update-player-track) objects. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs a field column

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm dumb, but I can't figure out what needs to go into field 😅

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly
I have no idea what this is supposed to be xd

README.md Outdated
Comment on lines 94 to 102
```json5
{
[
{
"encoded": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd"
}
]
}
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this payload doesn't look correct to me

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, I couldn't figure out how else it wanted the payload. All that worked for me was taking an array of encoded tracks and then converting it directly to JSON

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you showed an object which contains an array, that's not valid json
it shiuld just be an array of objects

@Droid00000
Copy link
Author

Update: 👋 I’m still around to work on this. Ideally, I’ll be able to apply your feedback sometime next week. Apologies for the delay

README.md Outdated
Comment on lines 94 to 102
```json5
{
[
{
"encoded": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRd"
}
]
}
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you showed an object which contains an array, that's not valid json
it shiuld just be an array of objects

README.md Outdated
Comment on lines 86 to 89
| Type | Description |
|---------------------------------------------------|-----------------------------------------------------------------------------------------------|
| [track](https://lavalink.dev/api/rest.html#track) | A track object returned in API responses. |
| update_queue | An array of [update player track](https://lavalink.dev/api/rest#update-player-track) objects. |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly
I have no idea what this is supposed to be xd

@Droid00000 Droid00000 requested a review from topi314 March 31, 2025 02:35
README.md Outdated
* [Update Queue Track](#update-queue-tracks)
* [Get Queue Track](#get-queue-track)
* [Add Queue Track](#add-queue-track)
* [Delete Queue Track(s)](#delete-queue-track(s))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just do Delete Queue Tracks, this link doesn't work

README.md Outdated

yes, no docs lol. No newline at end of file
> [!IMPORTANT]
> This plugin *requires* Lavalink `v4.0.5` or greater
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this plugin actually requires 4.0.6 or greater

README.md Outdated
Comment on lines 51 to 85
### Queue Modes

| Type | Description |
|-----------------|----------------------------------------------------|
| `normal` | Tracks will be played in the order they are added. |
| `repeat_track` | A single track will be repeatedly played. |
| `repeat_queue` | The queue will repeat once it has ended. |

---

### Queue Object

| Field | Type | Description |
|----------------------|--------------------------------------------------------------------|-----------------------------------------|
| mode | [string](#queue-modes) | The mode of the queue. |
| tracks | array of [track](https://lavalink.dev/api/rest.html#track) objects | An array of track objects in the queue. |

<details>
<summary>Example Payload</summary>

```json
{
"type": "normal",
"tracks": [
{
"encoded": "...",
"info": {},
"pluginInfo": {},
"userData": {}
}
]
}
```

</details>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be under ### Common Types

README.md Outdated

---

### Add Queue Track
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be Set Queue Track or something like that since it replaces the track

README.md Outdated

---

## Endpoints
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is under ## API this needs to be ### Endpoints
same with the others

@topi314
Copy link
Owner

topi314 commented Apr 4, 2025

just as a note, if you resolve something please also resolve the conversation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants