Skip to content

Repository files navigation

ForgeLinked v2 🌋

Music made stronger with Lavalink for ForgeScript.


✨ Features

  • Simple and easy-to-use ForgeScript functions
  • Support for multiple event listeners
  • Support for different audio providers
  • Playlist & queue management
  • Lavalink v4 ready

📦 Installation

Install via npm, yarn, pnpm etc:

npm install @tryforge/forge.linked

🚀 Setup

First, import ForgeClient and ForgeLinked in your main file:

const{ ForgeClient }=require('@tryforge/forgescript')const{ ForgeLinked }=require('@tryforge/forge.linked')import*asdotenvfrom'dotenv'dotenv.config()constlavalink=newForgeLinked({nodes: [{id: "Public Lavalink Server",host: "lavalink.zack911.xyz",// or your VPS IP/domainport: 443,authorization: "ZackIsSoCool",// ✅ must be 'authorization'secure: true}],playerOptions: {defaultSearchPlatform: "youtube"},events: ['linkedPlayerCreate','linkedPlayerDestroy']})constclient=newForgeClient({intents: ['Guilds','GuildMessages','MessageContent','GuildVoiceStates'],events: ['messageCreate'],extensions: [lavalink],prefixes: ['.']})client.commands.add({name: 'e',type: 'messageCreate',code: '$onlyForUsers[Not for you!;$botOwnerID] $eval[$message]'})client.login(process.env.BOT_TOKEN)

⚙️ Lavalink Configuration

Provide Lavalink server details inside nodes:

constlavalink=newForgeLinked({nodes: [{id: "Main Node",host: "lavalink.example.com",port: 2333,authorization: "youshallnotpass",secure: false}]})

🔑 You can find public Lavalink nodes online or host your own.


💡 Tips

Default Search Engine

Set a default search engine in playerOptions:

constlavalink=newForgeLinked({playerOptions: {defaultSearchPlatform: 'youtube'}})

Available:

  • youtube
  • youtube music
  • soundcloud
  • spotify (if enabled)

📄 License

ForgeLinked v2 is licensed under the GPL-3 License. See LICENSE for more info.

About

An extension to facilitate the use of Lavalink server with ForgeScript.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages