Socket
Book a DemoInstallSign in
Socket

@tryforge/forge.linked

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryforge/forge.linked

A Lavalink implementation made for ForgeScript.

1.2.0
latest
npmnpm
Version published
Weekly downloads
4
-60%
Maintainers
0
Weekly downloads
 
Created
Source

ForgeLinked

Music made stronger with Lavalink for ForgeScript.

@tryforge/forge.linked @tryforge/forgescript Discord

Features

  • Simple and easy-to-use functions
  • Support for multiple event listeners
  • Various filters support (Coming soon)
  • Support for different audio providers
  • Playlist support

Contents

Installation

[!CAUTION] ⚠️ Warning
ForgeLinked is not compatible with ForgeMusic at the moment. Use it only if you understand Lavalink and its setup.

To install ForgeLinked in your project, use:

npm install @tryforge/forge.linked

If you're using a different package manager, look up how to install Node.js dependencies accordingly.

Setup

First, import ForgeLink and ForgeClient in your main file:

const { ForgeClient } = require('@tryforge/forgescript');
const { ForgeLink } = require('@tryforge/forge.link');

Then, create a new instance of ForgeLink with event listeners and Lavalink nodes:

const lavalink = new ForgeLink({
    events: {
        kazagumo: ['playerStart'],
        shoukaku: ['debug', 'ready']
    },
    kazagumoOptions: {
        defaultSearchEngine: 'youtube'
    },
    nodes: [
        {
            name: 'Public Node',
            auth: 'youshallnotpass',
            url: 'lavalink.jirayu.net:13592',
            secure: false
        }
    ]
});

Now, create the ForgeClient and attach lavalink as an extension:

const client = new ForgeClient({
    intents: [
        'Guilds',
        'GuildMessages',
        'MessageContent',
        'GuildVoiceStates'
    ],
    events: [
        'messageCreate'
    ],
    extensions: [lavalink],
    prefixes: ['.']
});

[!INFO] ⚠️ Important
Ensure your ForgeClient has the GuildVoiceStates intent enabled for ForgeLink functions to work properly.

Listening Events

ForgeLinked allows you to listen to specific Lavalink events. To do this, define them inside the events object:

const lavalink = new ForgeLink({
    events: {
        kazagumo: ['playerStart'],
        shoukaku: ['debug', 'ready']
    }
});

Then, you can add custom event handlers:

lavalink.commands.kazagumo.add({
    type: 'playerStart',
    code: '$log[A track started playing now.]'
});

lavalink.commands.shoukaku.add(
    {
        type: 'debug',
        code: '$log[NODE "$env[name]" -> $env[info]]'
    },
    {
        type: 'ready',
        code: '$log[NODE "$env[name]" IS READY]'
    }
);

To connect ForgeLinked to a Lavalink server, provide the nodes parameter in the setup:

const lavalink = new ForgeLink({
    events: {
        kazagumo: ['playerStart'],
        shoukaku: ['debug', 'ready']
    },
    nodes: [
        {
            name: 'Public Node',
            auth: 'youshallnotpass',
            url: 'lavalink.jirayu.net:13592',
            secure: false
        }
    ]
});

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

Tips

Default Search Engine

Lavalink supports multiple search engines. To specify a default, add it under kazagumoOptions:

const lavalink = new ForgeLink({
    kazagumoOptions: {
        defaultSearchEngine: 'youtube'
    }
});

Contributors

Many thanks to everyone who contributed to this project! ❤️

Special thanks to Cyberghost for assisting with the event and command managers—without them, this wouldn’t have been possible!

This package was developed with ♥️ by Econome.

We hope you enjoy using ForgeLink!

Contributors

FAQs

Package last updated on 21 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.