Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jarvis.djs

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jarvis.djs

Jarvis.djs Is a Javascript Discord Client Used For Interacting With The Discord API

  • 1.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Jarvis

Jarvis

Javascript Discord Lib For Interacting With The Discord API!

Issues Issues GitHub pull requests

NPM

This Is Not Fully Working! Please Do Not Donwload and Complain Because This Is a Work In Progress! PR Welcomed!

Table of Contents

Requirements

  • Node.JS => 14.0.0

Installation

# Stable
npm i --save jarvis.djs

# Nightly Builds
npm i --save jarvis.djs@nightly

Yarn

# Stable
yarn add jarvis.djs

# Nightly Builds
yarn add jarvis.djs@nightly

Usage

Import the lib via ES6 or commonJS modules

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

Client

const discord = require('jarvis.djs');
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': 'Bot <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

Keywords

FAQs

Package last updated on 31 May 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc