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

@sudomoose/discord.node

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sudomoose/discord.node - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

src/client/Base.js

15

package.json
{
"name": "@sudomoose/discord.node",
"version": "0.0.2",
"description": "A (very beta) Discord API wrapper",
"version": "0.0.3",
"description": "An in-development node.js wrapper for the Discord API.",
"main": "src/index.js",

@@ -18,3 +18,7 @@ "scripts": {

"bot",
"js"
"javascript",
"js",
"nodejs",
"discordapp",
"discord-api"
],

@@ -26,3 +30,6 @@ "author": "sudomoose",

},
"homepage": "https://github.com/ThatTonybo/discord.node#readme"
"homepage": "https://github.com/ThatTonybo/discord.node#readme",
"dependencies": {
"ws": "^6.0.0"
}
}

@@ -0,7 +1,14 @@

[![DiscordApi](https://img.shields.io/badge/Discord-API-blue.svg)](https://discordapp.com/developers/docs/reference) [![NPM Version](https://img.shields.io/npm/v/@sudomoose/discord.node.svg)](https//npmjs.org/package/@sudomoose/discord.node) [![Downloads](https://img.shields.io/npm/dw/@sudomoose/discord.node.svg)](https://npmjs.org/package/@sudomoose/discord.node#install)
![npm](https://img.shields.io/npm/l/@sudomoose/discord.node.svg)
![Discord](https://img.shields.io/discord/475469335092265011.svg?label=Chat%20on%20Discord)
# discord.node
💻 A node.js wrapper for the Discord API.
:sparkles: Join us at [discord.gg/Mu3NTtN](https::/discord.gg/Mu3NTtN)!
# install
# Install
```
npm install @sudomoose/discord.node --save
```

@@ -1,10 +0,45 @@

const APIClient = require('./APIClient');
const Base = require('./Base');
/*
/**
* Main client for API interaction, etc.
* @extends {APIClient}
* @extends {Base}
*/
class Client extends API {
class Client extends Base {
/**
* @param {ClientOptions}[options]
*/
constructor(options = {}) {
super(Object.assign({
_accountType: 'Bot'
}, options));
}
this.token = null;
/**
* Client's WebSocketManager
* @type {WebSocketManager}
* @private
*/
this.ws = new WebSocketManager(this);
}
/**
* @param {string} token
* @returns {Promise<string>}
* @example
* client.setToken('token'); // note, do not include "Bot " or anything before your token
*/
setToken(token = this.token) {
if (!token || typeof token !== 'string') throw new Error('INVALID_TOKEN');
this.token = token;
}
}
module.exports = Client;
module.exports = {
APICliet: require('./client/APICliet'),
Base: require('./client/Base'),
Client: require('./client/Client')
};

@@ -1,1 +0,2 @@

const Discord = require('../src/index');
const Discord = require('../src/index');
const Client = new Discord.Client();
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