Registry / productivity / larakazagumo

larakazagumo

JSON →
library1.2.0jsnpmunverified

Kazagumo is a Shoukaku wrapper that provides built-in queue management for Lavalink-based Discord music bots. Current stable version is 1.2.0, updated regularly. It simplifies integration by handling queue logic, track loading, and player management, differentiating from raw Shoukaku by reducing boilerplate. Supports TypeScript, ESM, and works with Discord.js and other frameworks. Intended for Node.js 16.5+.

npm install larakazagumo
INSTALL
IMPORT
SIG · LARAKAZAGUMO
L
larakazagumo
productivityjavascriptv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Kazagumo
import { Kazagumo } from 'kazagumo'
const Kazagumo = require('kazagumo')
ESM-only; Kazagumo is a named export, not default.
KazagumoPlayer
import { KazagumoPlayer } from 'kazagumo'
import KazagumoPlayer from 'kazagumo'
Named export, not default.
KazagumoQueue
import { KazagumoQueue } from 'kazagumo'
import { Queue } from 'kazagumo'
The queue class is named KazagumoQueue, not Queue.

Initializes Kazagumo with Lavalink nodes, creates a player, searches for a track, adds it to the queue, and starts playback.

import { Kazagumo } from 'kazagumo'; import { Connectors } from 'shoukaku'; const kazagumo = new Kazagumo( { defaultVolume: 70, defaultSearchEngine: 'youtube', send: (guildId, payload) => { const guild = client.guilds.cache.get(guildId); guild?.shard.send(payload); }, }, new Connectors.DiscordJS(client), [ { name: 'Node 1', url: process.env.LAVALINK_URL ?? 'localhost:2333', auth: process.env.LAVALINK_PASS ?? 'password', }, ], { options: { moveOnDisconnect: true, resumable: true, resumableTimeout: 30, reconnectTries: 2, reconnectInterval: 5, }, }, ); kazagumo.on('playerCreate', (player) => { console.log(`Player created for guild ${player.guildId}`); }); // Play a track const player = kazagumo.createPlayer({ guildId: '123', voiceId: '456', textId: '789', }); const result = await kazagumo.search('https://www.youtube.com/watch?v=dQw4w9WgXcQ', { requester: user }); if (result.tracks.length) { player.queue.add(result.tracks[0]); if (!player.playing && !player.paused) await player.play(); }
Debug
Known issues
gotchaKazagumo is ESM-only. Using require() will throw a ReferenceError.
fix
Use import syntax and set 'type': 'module' in package.json or use .mjs extension.
affects: >=1.0.0
breakingKazagumoPlayer#play() will throw if the queue is empty. Always add a track before calling play().
fix
Check player.queue.length or ensure at least one track is added before player.play().
affects: >=1.0.0
deprecatedKazagumo#search() may be deprecated in future for a more standardized method.
fix
Watch for updates and migrate to new search API when released.
affects: >=1.2.0
Errors
Common errors & fixes
TypeError: Kazagumo is not a constructor
Using CommonJS require() instead of ESM import.
fix
Use import { Kazagumo } from 'kazagumo' and ensure project uses ESM (e.g., 'type': 'module' in package.json).
Error: No available nodes found
Lavalink node URL or auth invalid, or node is not running.
fix
Check LAVALINK_URL and LAVALINK_PASS environment variables; ensure Lavalink server is running and reachable.
Cannot read properties of undefined (reading 'play')
Calling player.play() before adding any tracks to the queue.
fix
Add a track to player.queue before calling player.play().
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies
shoukakurequiredCore dependency for Lavalink node communication
discord.jsoptionalTypical peer dependency for Discord bot integration (if used)
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
larakazagumo — npm install larakazagumo · libregistry