{"id":16151106,"url":"https://github.com/kagchi/lavalink-repl","last_synced_at":"2025-03-18T19:30:56.284Z","repository":{"id":39167493,"uuid":"333074438","full_name":"KagChi/lavalink-repl","owner":"KagChi","description":"Lavalink on replit","archived":false,"fork":false,"pushed_at":"2022-06-30T16:23:54.000Z","size":47,"stargazers_count":52,"open_issues_count":0,"forks_count":122,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T11:48:41.540Z","etag":null,"topics":["lavalink","lavalink-hosting","lavalink-musicbot","lavalink-on-repl","lavalink-on-replit","lavalink-repl","lavalink-server","replit"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/KagChi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-26T12:14:33.000Z","updated_at":"2025-02-25T12:25:36.000Z","dependencies_parsed_at":"2022-08-09T11:48:22.030Z","dependency_job_id":null,"html_url":"https://github.com/KagChi/lavalink-repl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KagChi%2Flavalink-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KagChi%2Flavalink-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KagChi%2Flavalink-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KagChi%2Flavalink-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KagChi","download_url":"https://codeload.github.com/KagChi/lavalink-repl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945605,"owners_count":20372896,"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":["lavalink","lavalink-hosting","lavalink-musicbot","lavalink-on-repl","lavalink-on-replit","lavalink-repl","lavalink-server","replit"],"created_at":"2024-10-10T00:54:32.478Z","updated_at":"2025-03-18T19:30:56.036Z","avatar_url":"https://github.com/KagChi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lavalink-repl\nLavalink on replit\n\u003cbr\u003e\n\u003ca href=\"https://replit.com/github/kagchi/lavalink-repl\"\u003e\u003cimg src=\"https://img.shields.io/badge/REPL-FORK-green\"\u003e\u003c/a\u003e\n## Connecting\n- [x] Lavalink's port will always 443 \n- [x] Default password `youshallnotpass`\n- [x] using custom lavalink client if your client doesnt support secure options\n\n\n## Important notes:\n- [x] Do not change port in `application.yml`\n- [x] To keep this 24/7 you need to make an account on UptimeRobot service, and make HTTP request to your app every 5 minutes. For example, if your app is named `lavalink-repl` and your repl username is `ahmasa` then make HTTP request to `https://lavalink-repl.ahmasa.repl.co`\n- [x] Do not forget to set your password (in `application.yml` file)\n- [x] Connection to node must be secured E.g https/wss\\\n- [x] Does not automatically update, you must specify `AUTO_UPDATE` true in environtment variables \n## Advantages:\n- [x] Use java 13 :3\n- [x] Easy setup\n- [x] Using Dev build\n## Glitch\n- for glitch user here [Repo](https://github.com/KagChi/lavalink-glitch)\n\n## Example\n- [x] Latest Shoukaku (v1.6.x)\n```js\nconst { Client } = require('discord.js');\nconst { Shoukaku, Libraries } = require('shoukaku');\n\nconst LavalinkServer = [{ name: 'my-lavalink-server', url: 'lavalink-repl.ahmasa.repl.co:443', auth: 'youshallnotpass', secure: true }];\nconst ShoukakuOptions = { moveOnDisconnect: false, resumable: false, resumableTimeout: 30, reconnectTries: 2, restTimeout: 10000 };\n\nclass ExampleBot extends Client {\n    constructor(opts) {\n        super(opts);\n        this.shoukaku = new Shoukaku(new Libraries.DiscordJS(this), LavalinkServer, ShoukakuOptions);\n    }\n\n    login(token) {\n        this._setupShoukakuEvents();\n        this._setupClientEvents();\n        return super.login(token);\n    }\n\n    _setupShoukakuEvents() {\n        this.shoukaku.on('ready', (name) =\u003e console.log(`Lavalink ${name}: Ready!`));\n        this.shoukaku.on('error', (name, error) =\u003e console.error(`Lavalink ${name}: Error Caught,`, error));\n        this.shoukaku.on('close', (name, code, reason) =\u003e console.warn(`Lavalink ${name}: Closed, Code ${code}, Reason ${reason || 'No reason'}`));\n        this.shoukaku.on('disconnected', (name, reason) =\u003e console.warn(`Lavalink ${name}: Disconnected, Reason ${reason || 'No reason'}`));\n        this.shoukaku.on(\"debug\", (name, reason) =\u003e console.debug(`Lavalink node ${name}`, reason || \"No reason\"));\n    }\n\n    _setupClientEvents() {\n        this.on('messageCreate', async (msg) =\u003e {\n            if (msg.author.bot || !msg.guild) return;\n            if (!msg.content.startsWith('$play')) return;\n            if (this.shoukaku.players.get(msg.guild.id)) return;\n            const args = msg.content.split(' ');\n            if (!args[0]) return;\n            const node = this.shoukaku.getNode();\n            let query = args.join(' ');\n            let data = await node.rest.resolve(query);\n            if (!data) return;\n            const player = await node.joinChannel({\n                guildId: msg.guild.id,\n                shardId: msg.guild.shardId || 0,\n                channelId: msg.member.voice.channelId,\n                deaf: true\n            });\n            const events = ['end', 'error', 'closed', 'disconnect', 'nodeDisconnect'];\n            for (const event of events) {\n                player.on(event, info =\u003e {\n                    console.log(info);\n                    player.disconnect();\n                });\n            }\n            data = data.tracks.shift();\n            player.playTrack(data); \n            await msg.channel.send({ content: `Now Playing ${data.info.title}`});\n        });\n        this.on('ready', () =\u003e console.log('Bot is now ready'));\n    }\n}\n\nnew ExampleBot()\n    .login('token')\n    .catch(console.error);\n```\nExample bot [here](https://github.com/KagChi/noteblock)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkagchi%2Flavalink-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkagchi%2Flavalink-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkagchi%2Flavalink-repl/lists"}