@team-hydra/apollo
v0.0.15
Published
A simple lavalink client.
Readme
Apollo
Lavalink Library for JavaScript
Usage
This example uses Athena but can be used with any library.
const apollo = new ApolloManager(
{
nodes: [
{
host: 'localhost',
port: 2333,
secure: false,
password: 'youshallnotpass'
}
]
},
(packet) => {
client.guilds.get(packet.d.guild_id)!.shard.sendWS(packet.op, packet.d);
}
);
client.on('ready', () => {
apollo.init(client.user.id);
});
client.on('rawWS', (data) => {
// @ts-expect-error -- This comment is needed for typescript unless you type guard the data
apollo.handleVoiceState(data);
});