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

discord.js

Package Overview
Dependencies
Maintainers
1
Versions
1736
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord.js - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

0

.settings/settings.json
// Place your settings in this file to overwrite default and user settings.
{
}

@@ -0,0 +0,0 @@ // Available variables which can be used inside of strings.

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ "use strict";

32

lib/Client.js

@@ -123,3 +123,2 @@ //discord.js modules

this.createws();
return new Promise(function (resolve, reject) {

@@ -147,5 +146,11 @@ if (self.state === 0 || self.state === 4) {

self.token = res.body.token; //set our token
self.trySendConnData();
callback(null, self.token);
resolve(self.token);
getGateway().then(function (url) {
self.createws(url);
callback(null, self.token);
resolve(self.token);
})["catch"](function (err) {
callback(err);
reject(err);
});
}

@@ -692,3 +697,3 @@ });

key: "createws",
value: function createws() {
value: function createws(url) {
if (this.websocket) return false;

@@ -699,3 +704,3 @@

//good to go
this.websocket = new WebSocket(Endpoints.WEBSOCKET_HUB);
this.websocket = new WebSocket(url);

@@ -1420,2 +1425,17 @@ //open

function getGateway() {
var self = this;
return new Promise(function (resolve, reject) {
request.get(Endpoints.API + "/gateway").end(function (err, res) {
if (err) {
reject(err);
} else {
resolve(res.body.url);
}
});
});
}
module.exports = Client;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

8

package.json
{
"name": "discord.js",
"version": "3.1.1",
"version": "3.1.2",
"description": "A way to interface with the Discord API",

@@ -11,3 +11,3 @@ "main": "./lib/index.js",

"type": "git",
"url": "git+https://github.com/discord-js/discord.js.git"
"url": "git+https://github.com/hydrabolt/discord.js.git"
},

@@ -25,5 +25,5 @@ "keywords": [

"bugs": {
"url": "https://github.com/discord-js/discord.js/issues"
"url": "https://github.com/hydrabolt/discord.js/issues"
},
"homepage": "https://github.com/discord-js/discord.js#readme",
"homepage": "https://github.com/hydrabolt/discord.js#readme",
"dependencies": {

@@ -30,0 +30,0 @@ "superagent": "^1.3.0",

# discord.js
[![Build Status](https://travis-ci.org/discord-js/discord.js.svg)](https://travis-ci.org/discord-js/discord.js)
[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)

@@ -5,0 +5,0 @@ discord.js is a node module used as a way of interfacing with

@@ -135,3 +135,2 @@ //discord.js modules

this.createws();
return new Promise(function (resolve, reject) {

@@ -161,5 +160,12 @@ if (self.state === 0 || self.state === 4) {

self.token = res.body.token; //set our token
self.trySendConnData();
callback(null, self.token);
resolve(self.token);
getGateway().then(function (url) {
self.createws(url);
callback(null, self.token);
resolve(self.token);
}).catch(function (err) {
callback(err);
reject(err);
});
}

@@ -671,3 +677,3 @@

//def createws
createws() {
createws(url) {
if (this.websocket)

@@ -679,3 +685,3 @@ return false;

//good to go
this.websocket = new WebSocket(Endpoints.WEBSOCKET_HUB);
this.websocket = new WebSocket(url);

@@ -1113,2 +1119,20 @@ //open

function getGateway() {
var self = this;
return new Promise(function (resolve, reject) {
request
.get(`${Endpoints.API}/gateway`)
.end(function (err, res) {
if (err) {
reject(err);
} else {
resolve(res.body.url);
}
});
});
}
module.exports = Client;

@@ -0,0 +0,0 @@ exports.BASE_DOMAIN = "discordapp.com";

@@ -0,0 +0,0 @@ var request = require("superagent");

@@ -0,0 +0,0 @@ var request = require( "superagent" );

@@ -0,0 +0,0 @@ class Invite {

@@ -0,0 +0,0 @@ class Message{

@@ -0,0 +0,0 @@ class PMChannel {

@@ -0,0 +0,0 @@ class User{

@@ -10,4 +10,12 @@ /*

function init(){
console.log("preparing...");
}
mybot.on("ready", function(){
console.log("ready! beginning tests");
success1();
});
function success1(){ //make server
console.log("preparing...");
mybot.createServer("test-server", "london").then(success2).catch(error);

@@ -127,2 +135,2 @@ }

mybot.login(process.env["ds_email"], process.env["ds_password"]).then(success1).catch(error);
mybot.login(process.env["ds_email"], process.env["ds_password"]).then(init).catch(error);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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