A lavalink@v4 client easy to use, up-to-date and all ears.
npm install hoshimiA lavalink@v4 client easy to use, up-to-date, and of course
sh
Stable... and the development one (unstable)...
Using NPM
npm install hoshimi # Stable
npm install https://github.com/Ganyu-Studios/Hoshimi.git # Development
Using PNPM
pnpm install hoshimi
pnpm install https://github.com/Ganyu-Studios/Hoshimi.git
Using YARN
yarn add hoshimi
yarn add https://github.com/Ganyu-Studios/Hoshimi.git
Using BUN
bun add hoshimi
bun add https://github.com/Ganyu-Studios/Hoshimi.git
`
π Basic Setup
You can read this or you can follow this one:
`typescript
import { Hoshimi } from "hoshimi"; // She is all ears!
import { Client } from "seyfert"; // Only example client, you can use whatever you want...
const client = new Client(); // https://www.seyfert.dev/guide
const hoshimi = new Hoshimi({
nodes: [
{
host: "localhost",
port: 2333,
password: "youshallnotpass",
},
], // Add more nodes if you want!
sendPayload(guildId, payload) {
// Your client send to shard payload function
client.gateway.send(client.gateway.calculateShardId(guildId), payload);
},
});
// Bind the manager into your client!
client.hoshimi = hoshimi;
// FOLLOW YOUR CLIENT EVENT IMPLEMENTATION
// THIS IS ONLY A EXAMPLE, NOT A REAL USAGE
client.events.values.READY = {
__filePath: null,
data: { name: "ready", once: true },
run(user, client) {
client.logger.info(Logged in as ${user.username});
// Call the manager to initialize hoshimi
hoshimi.init({ ...user, username: user.username });
},
};
client.events.values.RAW = {
__filePath: null,
data: { name: "raw" },
async run(data, client) {
// Call the handler on the gateway dispatch events
await hoshimi.updateVoiceState(data);
},
};
(async () => {
await client.start();
})();
`
π Used By
- For now, no one is using it :(
π Additional Notes
I am currently working on this package. This package takes some ideas provided from libraries like:
- π¦ lavalink-client
- π¦ kazagumo
- π¦ distube
- π¦ discord-player
- π¦ shoukaku`