Skip to content

Commit

Permalink
Update Lavaplayer usage (#7)
Browse files Browse the repository at this point in the history
* Update lavaplayer usage

* updated readme according to requested changes

* updates readme according to requested changes

* added source registration info
  • Loading branch information
szymonwilczek authored Aug 17, 2024
1 parent ec65f3b commit 2edfc1b
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,28 @@ dependencies {

### Usage

// TODO
Create new `SearchManager`
```java
var searchManager = new SearchManager();

//register sources
searchManager.registerSearchManager(source);
```

Basic usage
```java
var query = "ytmsearch:bla bla";
var types = List.of(
AudioSearchResult.Type.TRACK,
AudioSearchResult.Type.PLAYLIST,
AudioSearchResult.Type.ALBUM,
AudioSearchResult.Type.ARTIST,
AudioSearchResult.Type.TEXT
);


AudioSearchResult searchResult = searchManager.loadSearch(query, types);
```

## Lavalink Usage

Expand Down

0 comments on commit 2edfc1b

Please sign in to comment.