{"id":14983535,"url":"https://github.com/lavaclient/lavaclient","last_synced_at":"2025-04-09T07:01:46.811Z","repository":{"id":44433589,"uuid":"258786598","full_name":"lavaclient/lavaclient","owner":"lavaclient","description":"A simple, easy-to-use, and flexible lavalink client for node.js","archived":false,"fork":false,"pushed_at":"2025-03-05T17:14:09.000Z","size":688,"stargazers_count":116,"open_issues_count":2,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T05:12:02.706Z","etag":null,"topics":["audio","client","discord","lavalink","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://lavaclient.js.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lavaclient.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"melike2d","github":["melike2d"]}},"created_at":"2020-04-25T13:47:47.000Z","updated_at":"2025-01-28T15:57:39.000Z","dependencies_parsed_at":"2023-11-26T23:27:46.584Z","dependency_job_id":"fa15c423-e2cb-4fbb-aa06-066eb60aabeb","html_url":"https://github.com/lavaclient/lavaclient","commit_stats":{"total_commits":187,"total_committers":24,"mean_commits":7.791666666666667,"dds":0.5614973262032086,"last_synced_commit":"d034c85d18c923653b5fb59b5c4229487288a148"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavaclient%2Flavaclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavaclient%2Flavaclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavaclient%2Flavaclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavaclient%2Flavaclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lavaclient","download_url":"https://codeload.github.com/lavaclient/lavaclient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247856541,"owners_count":21007620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","client","discord","lavalink","nodejs","typescript"],"created_at":"2024-09-24T14:07:20.774Z","updated_at":"2025-04-09T07:01:46.781Z","avatar_url":"https://github.com/lavaclient.png","language":"TypeScript","funding_links":["https://ko-fi.com/melike2d","https://github.com/sponsors/melike2d"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/lavaclient/.github/raw/main/assets/banner.png\" align=\"center\"\u003e\r\n\r\n\u003e A lightweight and powerful [lavalink](https://github.com/freyacodes/lavalink) client for nodejs.\r\n\r\n- **Easy-to-use:** lavaclient has a neat and user-friendly promise-based api.\r\n- **Performant:** designed to be small and lightweight, it's a great choice for any project.\r\n- **Library Agnostic:** lavaclient doesn't require you to use a specific discord library. Use anything you want!\r\n\r\n[**Support Server**](https://discord.gg/GQgM5pbJWm)\r\n\r\n\u003c!--\r\n\r\n\u003ch1 align=\"center\"\u003eInstallation\u003c/h1\u003e\r\n\r\n[Node.js LTS (v18)](https://nodejs.org) or newer is required\r\n\r\n##### Stable\r\n\r\n```shell\r\nyarn add lavaclient # or npm install\r\n```\r\n\r\n##### Beta (may be outdated)\r\n\r\n```shell\r\nyarn add lavaclient@beta # or npm install\r\n```\r\n\r\n##### Deno\r\n\r\nIf you're looking for a [Deno](https://deno.land) variant of lavaclient... We've got you covered!!\r\n\r\n- **Lavadeno:** \u003chttps://github.com/lavaclient/lavadeno\u003e\r\n\r\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\r\n\r\n### Setup\r\n\r\nEven though the following examples use import syntax, Lavaclient also supports CommonJS!\r\n\r\n```ts\r\nimport { Cluster, Node } from \"lavaclient\";\r\n\r\nconst info = { host: \"localhost\", port: 2333, password: \"youshallnotpass\" };\r\n\r\nconst lavalink = new Node({\r\n    connection: info,\r\n    sendGatewayPayload: (id, payload) =\u003e sendWithDiscordLib(id, payload),\r\n});\r\n\r\n// or for clustering:\r\n\r\nconst lavalink = new Cluster({\r\n    nodes: [ { id: \"main\", ...info } ],\r\n    sendGatewayPayload: (id, payload) =\u003e sendWithDiscordLib(id, payload),\r\n});\r\n\r\nlavalink.connect(\"870267613635309618\");\r\n```\r\n\r\n### Handling Voice Updates\r\n\r\nLavalink requires voice updates to play audio in a voice channel, this may vary from library to library.\r\n\r\nWhat you need for correctly sending voice updates to lavalink:\r\n\r\n1. A connection to the Discord gateway.\r\n2. [**Raw** Voice _State_ and _Server_ updates](https://discord.com/developers/docs/topics/gateway#voice)\r\n3. Passing the data of the voice update to `(Cluster|Node)#handleVoiceUpdate`\r\n\r\n- [discord.js v13 example](https://github.com/lavaclient/djs-v13-example)\r\n\r\n### Playing Music\r\n\r\n```ts\r\nconst results = await lavalink.rest.loadTracks(\r\n    \"ytsearch:never gonna give you up\",\r\n);\r\n\r\nawait lavalink\r\n    .createPlayer(\"830616783199010857\")\r\n    .connect(\"830638203739308053\")\r\n    .play(results.tracks[0]);\r\n```\r\n\r\n\u003csub\u003ethis is a very poor way of playing music btw... checkout our [discord.js example](https://github.com/lavaclient/djs-v13-example)\u003c/sub\u003e\r\n\r\n---\r\n\r\nNeed some more help? Join our [**Support Server**](https://discord.gg/GQgM5pbJWm)\r\n\r\n[![Rate this package](https://badges.openbase.com/js/rating/lavaclient.svg?token=7xbXCE61YwbjuEPTGbWP9q9GXQStpvuXdzoYBVY6i1k=)](https://openbase.com/js/lavaclient?utm_source=embedded\u0026amp;utm_medium=badge\u0026amp;utm_campaign=rate-badge)\r\n--\u003e\r\n\r\n---\r\n\r\n[lavaclient](https://lavaclient.js.org/) \u0026copy; 2018 - 2024\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavaclient%2Flavaclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flavaclient%2Flavaclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavaclient%2Flavaclient/lists"}