mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
Whoops, compiled the changes this time :P
This commit is contained in:
@@ -139,7 +139,9 @@ var Client = (function () {
|
|||||||
if (err) {
|
if (err) {
|
||||||
self.state = 4; //set state to disconnected
|
self.state = 4; //set state to disconnected
|
||||||
self.trigger("disconnected");
|
self.trigger("disconnected");
|
||||||
self.websocket.close();
|
if (self.websocket) {
|
||||||
|
self.websocket.close();
|
||||||
|
}
|
||||||
callback(err);
|
callback(err);
|
||||||
reject(err);
|
reject(err);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ var PMChannel = (function () {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
key: "isPrivate",
|
||||||
|
get: function get() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return PMChannel;
|
return PMChannel;
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ var Channel = (function () {
|
|||||||
get: function get() {
|
get: function get() {
|
||||||
return this.server.client;
|
return this.server.client;
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
key: "isPrivate",
|
||||||
|
get: function get() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Channel;
|
return Channel;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ var _createClass = (function () { function defineProperties(target, props) { for
|
|||||||
|
|
||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||||
|
|
||||||
|
var PMChannel = require("./PMChannel.js");
|
||||||
|
|
||||||
var Message = (function () {
|
var Message = (function () {
|
||||||
function Message(data, channel, mentions, author) {
|
function Message(data, channel, mentions, author) {
|
||||||
_classCallCheck(this, Message);
|
_classCallCheck(this, Message);
|
||||||
@@ -64,6 +66,11 @@ var Message = (function () {
|
|||||||
get: function get() {
|
get: function get() {
|
||||||
return this.author;
|
return this.author;
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
key: "isPrivate",
|
||||||
|
get: function get() {
|
||||||
|
return this.channel.isPrivate;
|
||||||
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Message;
|
return Message;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discord.js",
|
"name": "discord.js",
|
||||||
"version": "3.2.0",
|
"version": "3.2.1",
|
||||||
"description": "A way to interface with the Discord API",
|
"description": "A way to interface with the Discord API",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ mybot.on("message", function (message) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mybot.on("ready", function(){
|
||||||
|
console.log("im ready");
|
||||||
|
setInterval(function(){
|
||||||
|
console.log(mybot.websocket.state, "state");
|
||||||
|
}, 2000);
|
||||||
|
})
|
||||||
|
|
||||||
function dump(msg) {
|
function dump(msg) {
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user