New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

chiro.js

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chiro.js

A easy to use client for nexus

Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

discord.js


Discord server NPM version NPM downloads Patreon

About

Chiro.js is a powerful Node.js module that allows you to easily interact with the Nexus. Chiro.js is highly inspired from Erela.JS which is a module for lavalink.

Installation

Node.js 14.0.0 or newer is required.

npm install chiro.js

Example usage

const { Client } = require("discord.js");
const { Manager } = require("chiro.js");
const client = new Client();
const manager = new Manager({    
    nodes:      
        {
            host: "localhost",
            port: 3000,
            password: "mostsecurepassword",
        },
    send(id, payload) {
        const guild = client.guilds.cache.get(id);
        if (guild) guild.shard.send(payload);
    },
}).on("trackStart", (player, track) => {
    console.log(`${track.title} has started`);
});

client.on("ready", () => {
    manager.init(client.user.id);
    console.log(`Logged in as ${client.user.tag}!`);
});

client.on("message", async (message) => {
    if (message.content === "play") {
        const player = manager.create({
            guild: message.guild.id,
            textChannel: message.channel.id,
            voiceChannel: message.member.voice.channel.id,
        });
        const res = await player.send({
            query: "play that funky music",
        });

        player.queue.add(res.tracks[0]);
        player.play();
    }
});

client.on('raw', (d)=>{
    manager.updateVoiceState(d);
})

client.login("token");

Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official Chiro.js Server.

Notice

The documentation is WIP. This is just a temporary docs

Keywords

nexus

FAQs

Package last updated on 18 Jul 2021

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