borvis.js
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Borvis

Borvis

Javascript Discord Lib For Interacting With The Discord API! With selfbotting allowed.

Issues Issues GitHub pull requests

NPM

THIS IS A FORK. ORIGINIAL IS JARVIS.

Table of Contents

Requirements

  • Node.JS => 14.0.0

Installation

NPM (recommended)

# Stable
npm i --save borvis.js

# Nightly Builds
npm i --save borvis.js@nightly

Yarn

# Stable
yarn add borvis.js

# Nightly Builds
yarn add borvis.js@nightly

Usage

Import the lib via ES6 or commonJS modules

// ES6
import * as discord from "borvis.js";
// or commonJS
const discord = require("borvis.js");

Client

const discord = require('borvis.js');
const client = new discord.Client({
    guild_subscriptions: false,
    intents: 32509,  // https://ziad87.net/intents/
    presence: "online",
    status: {
        text: "Status Text",
        type: 0 // Types: 0 = Playing, 1 = Streaming, 2 = Listening
    },
    ws: {
      large_threshold: 250,
      compress: false
    }
});

// Add This Before Anything Else
client.login("TOKEN");

client.on("ready", async() => {
    console.log("Ready!")
});

client.on("message", async (message) => {
    console.log(message.content);
});

Client Methods

Destroy Client:

client.destroy(); // Will destroy the client along with the discord connection

Ready Timestamp:

client.readyAt();

Manual REST Request:

client.manualREST("https://discordapp.com/api/v8/gateway", "GET", {
    'Content-Type': 'application/json',
    'authorization': '<TOKEN>'
});

Fetch Guild:

client.fetchGuild("ID").then(res => {
    console.log(res);
});

Create Guild:

client.createGuild(name, region, icon).then(res => {
    console.log(res);
});

Events

Ready Event:

ready - When Client Is Ready
warn - Warnings
error - When There Is An Error

Discord Gateway

This is the connection between the client and discord api servers.

License

FOSSA Status

Package Sidebar

Install

npm i borvis.js

Weekly Downloads

2

Version

2.0.1

License

Apache-2.0

Unpacked Size

45.9 kB

Total Files

35

Last publish

Collaborators

  • ix1x0x2