npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vaparklink

v1.0.1

Published

Auto Lavalink Connection for Discord Bots - Auto-connect to free Lavalink nodes worldwide

Readme

🎵 VaparkLink - Auto Lavalink Connection


✨ Features

  • Auto Lavalink Discovery - ดึง Lavalink free servers จากทั่วโลกอัตโนมัติ
  • Health Check System - ตรวจสอบสถานะ nodes อยู่ตลอดเวลา
  • Auto Reconnect - เชื่อมต่อใหม่อัตโนมัติเมื่อ node offline
  • Multi-Region - มี servers ใน Thailand, Europe, Asia, Americas
  • Smart Node Selection - เลือก nodes ที่ response time ดีที่สุด
  • Easy Integration - ใช้งานได้กับ Riffy, Discord.js

📦 Installation

npm install vaparklink

🚀 Quick Start

Basic Usage

const { Client, GatewayIntentBits } = require('discord.js');
const { createVaparkLink } = require('vaparklink');

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildVoiceStates,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent
  ]
});

// Initialize VaparkLink - ไม่ต้องตั้งค่า Lavalink เอง!
async function main() {
  const vapark = await createVaparkLink(client, {
    maxNodes: 6,              // จำนวน nodes สูงสุดที่จะใช้
    defaultSearchPlatform: 'ytsearch',  // แพลตฟอร์มค้นหาเริ่มต้น
    autoReconnect: true,      // เชื่อมต่อใหม่อัตโนมัติ
  });

  // ใช้งาน Riffy
  const riffy = vapark.getRiffy();

  // สร้าง connection
  const player = riffy.createConnection({
    guildId: interaction.guild.id,
    voiceChannelId: interaction.member.voice.channel.id,
    textChannelId: interaction.channel.id,
    selfDeaf: true
  });

  // ค้นหาเพลง
  const result = await riffy.resolve({ query: 'Never Gonna Give You Up' });
  const track = result.tracks[0];
  player.play({ track });
}

client.once('ready', () => {
  console.log(`Bot ready as ${client.user.tag}`);
  main().catch(console.error);
});

client.on('raw', (d) => {
  const riffy = vapark.getRiffy();
  if (riffy && ['VOICE_STATE_UPDATE', 'VOICE_SERVER_UPDATE'].includes(d.t)) {
    riffy.updateVoiceState(d);
  }
});

client.login('YOUR_BOT_TOKEN');

TypeScript Usage

import { Client, GatewayIntentBits } from 'discord.js';
import { createVaparkLink, VaparkLink } from 'vaparklink';

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildVoiceStates,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent
  ]
});

let vapark: VaparkLink | null = null;

client.once('ready', async () => {
  vapark = await createVaparkLink(client, {
    maxNodes: 6,
    defaultSearchPlatform: 'ytsearch',
    autoReconnect: true,
    healthCheckInterval: 60000,
    requestTimeout: 5000
  });
});

📖 API Reference

createVaparkLink(client, options?)

สร้าง VaparkLink instance และ initialize อัตโนมัติ

| Parameter | Type | Description | |-----------|------|-------------| | client | Client | Discord.js Client instance | | options.maxNodes | number | จำนวน nodes สูงสุด (default: 8) | | options.defaultSearchPlatform | string | แพลตฟอร์มค้นหา (default: 'ytsearch') | | options.autoReconnect | boolean | เชื่อมต่อใหม่อัตโนมัติ (default: true) | | options.healthCheckInterval | number | Interval ตรวจสอบ health (ms) (default: 60000) | | options.reconnectInterval | number | Interval พยายาม reconnect (ms) (default: 30000) | | options.requestTimeout | number | Timeout สำหรับ health check (ms) (default: 5000) |

VaparkLink Instance Methods

| Method | Return | Description | |--------|--------|-------------| | .initialize() | Promise<Riffy> | Initialize VaparkLink | | .getRiffy() | Riffy \| null | ดึง Riffy instance | | .getStatus() | VaparkLinkStatus | ดึงสถานะของ VaparkLink | | .hasConnectedNodes() | boolean | ตรวจสอบว่ามี node เชื่อมต่ออยู่ | | .getConnectedNodeCount() | number | ดึงจำนวน nodes ที่เชื่อมต่อ | | .waitForConnection(timeout?) | Promise<boolean> | รอจนกว่าจะมี node เชื่อมต่อ | | .destroy() | void | ปิดการทำงาน |

Helper Functions

const { getGlobalNodePool, getNodes, getTotalPoolSize } = require('vaparklink');

// ดึง nodes ทั้งหมดใน pool
const allNodes = getGlobalNodePool();

// ดึง nodes จำนวน 5 nodes
const nodes = getNodes(5);

// ดึงจำนวน nodes ทั้งหมด
const total = getTotalPoolSize();

🌍 Global Node Pool

VaparkLink รวม Lavalink free servers จากทั่วโลก:

| Region | Nodes | |--------|-------| | 🇹🇭 Thailand | 3 | | 🇪🇺 Europe | 5 | | 🌏 Asia | 4 | | 🇺🇸 Americas | 2 | | 🌐 Global | 2 |

Total: 16+ free Lavalink nodes

📋 Requirements

  • Node.js 16+
  • discord.js 14+
  • riffy 1.x

📝 License

MIT License - Copyright (c) 2026 Kritsdika (FlashX)

🙏 Credits

  • Developed by: Kritsdika, CEO of FlashX
  • Lavalink Pool: Community free Lavalink servers worldwide
  • Powered by: Riffy

💡 Note: Lavalink free servers อาจมีการเปลี่ยนแปลงหรือ offline ได้ตลอดเวลา VaparkLink จะตรวจสอบและจัดการ nodes อัตโนมัติเพื่อให้ใช้งานได้เสมอ