{"id":22330118,"url":"https://github.com/thesharks/tyr","last_synced_at":"2025-07-21T08:32:47.191Z","repository":{"id":37796260,"uuid":"241869077","full_name":"TheSharks/Tyr","owner":"TheSharks","description":"Lightweight and library-agnostic Lavalink implementation","archived":false,"fork":false,"pushed_at":"2022-12-30T17:02:22.000Z","size":2467,"stargazers_count":7,"open_issues_count":9,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T17:06:30.013Z","etag":null,"topics":["discord","eris","lavalink","tyr"],"latest_commit_sha":null,"homepage":"https://thesharks.github.io/Tyr","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheSharks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"patreon":"Dougley","ko_fi":"dougley","github":"dougley"}},"created_at":"2020-02-20T11:38:47.000Z","updated_at":"2025-05-23T08:58:01.000Z","dependencies_parsed_at":"2023-01-31T12:00:30.298Z","dependency_job_id":null,"html_url":"https://github.com/TheSharks/Tyr","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/TheSharks/Tyr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharks%2FTyr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharks%2FTyr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharks%2FTyr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharks%2FTyr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheSharks","download_url":"https://codeload.github.com/TheSharks/Tyr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharks%2FTyr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266267290,"owners_count":23902334,"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":["discord","eris","lavalink","tyr"],"created_at":"2024-12-04T04:06:09.520Z","updated_at":"2025-07-21T08:32:47.174Z","avatar_url":"https://github.com/TheSharks.png","language":"TypeScript","funding_links":["https://patreon.com/Dougley","https://ko-fi.com/dougley","https://github.com/sponsors/dougley"],"categories":[],"sub_categories":[],"readme":"# Tyr\nTyr is a lightweight and library-agnostic [Lavalink](https://github.com/freyacodes/Lavalink) implementation.\n\nTyr includes a connection manager class for [Eris](https://github.com/abalabahaha/Eris).\n\n# Getting started with Eris\n## Installation\nTyr includes a `ErisPlayerManager` that replaces the built-in manager from Eris\n```js\nconst Eris = require('eris')\nconst bot = new Eris('cooltoken')\nconst { ErisPlayerManager } = require('@thesharks/tyr/eris')\n\nif (!(bot.voiceConnections instanceof ErisPlayerManager)) {\n  bot.voiceConnections = new ErisPlayerManager([\n    {\n      host: 'localhost',\n      port: 8080,\n      password: 'youshallnotpass',\n      region: 'eu', // what region is the node in?\n    }\n  ], {\n    shards: 2, // how many shards are you running?\n    userId: '107904023901777920' // what's the user ID from your bot?\n  })\n}\n```\n\n## Usage\nTo join voice channels and manipulate players, use the same methods you'd use with Eris\n```js\nbot.joinVoiceChannel('302538492393816086').then(player =\u003e {\n  // do something cool with the player\n})\n```\n\nPlaying tracks is done by first calling `\u003cNode\u003e.loadTracks`\n```js\nconst player = bot.voiceConnections.get('110462143152803840')\nplayer.node.loadTracks('ytsearch:qFDP9egTwfM').then(result =\u003e {\n  player.play(result.tracks[0].track)\n})\n```\n\n## Regions\nThe connection manager will try to balance players to nodes that are the least busy, and are in the same region as the guild the player is created from.\nBy default, the connection manager recognizes the following regions and what voice servers they correspond to:\n```js\n{\n  asia: ['singapore', 'hongkong', 'russia', 'japan', 'india', 'dubai'],\n  eu: ['europe', 'amsterdam', 'london', 'frankfurt', 'eu-central', 'eu-west', 'vip-amsterdam'],\n  us: ['us-west', 'us-east', 'us-central', 'us-south', 'brazil', 'vip-us-west', 'vip-us-east'],\n  africa: ['southafrica'],\n  australia: ['sidney']\n}\n```\nIt's possible to override the default regions by passing a new object with regions when constructing the connection manager","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesharks%2Ftyr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesharks%2Ftyr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesharks%2Ftyr/lists"}