discord.js
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -9,7 +9,7 @@ //discord.js modules | ||
var Endpoints = require("./Endpoints.js"); | ||
var User = require("./User.js"); | ||
var Server = require("./Server.js"); | ||
var Channel = require("./Channel.js"); | ||
var Message = require("./Message.js"); | ||
var Invite = require("./Invite.js"); | ||
var User = require("./user.js"); | ||
var Server = require("./server.js"); | ||
var Channel = require("./channel.js"); | ||
var Message = require("./message.js"); | ||
var Invite = require("./invite.js"); | ||
var PMChannel = require("./PMChannel.js"); | ||
@@ -16,0 +16,0 @@ |
{ | ||
"name": "discord.js", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A way to interface with the Discord API", | ||
"main": "./lib/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "node ./test/bot.js" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
//discord.js modules | ||
var Endpoints = require("./Endpoints.js"); | ||
var User = require("./User.js"); | ||
var Server = require("./Server.js"); | ||
var Channel = require("./Channel.js"); | ||
var Message = require("./Message.js"); | ||
var Invite = require("./Invite.js"); | ||
var User = require("./user.js"); | ||
var Server = require("./server.js"); | ||
var Channel = require("./channel.js"); | ||
var Message = require("./message.js"); | ||
var Invite = require("./invite.js"); | ||
var PMChannel = require("./PMChannel.js"); | ||
@@ -9,0 +9,0 @@ |
var request = require("superagent"); | ||
var Endpoints = require("./Endpoints.js"); | ||
var Endpoints = require("./Endpoints.js"); | ||
var Client = require("./Client.js"); | ||
@@ -4,0 +4,0 @@ |
@@ -1,60 +0,18 @@ | ||
var Discord = require("../lib/index.js"); | ||
var Auth = require("./auth.json"); | ||
var mybot = new Discord.Client(); | ||
/* | ||
mybot.login(Auth.email, Auth.password) | ||
*/ | ||
.then(function (token) { | ||
console.log("wooo!"); | ||
}).catch(function (error) { | ||
console.log(error); | ||
}); | ||
var Discord = require("../"); | ||
var mybot = new Discord.Client(); | ||
mybot.on("ready", function () { | ||
console.log("Ready!"); | ||
}) | ||
mybot.login("email", "password").then(success).catch(error); | ||
mybot.on("message", function (msg) { | ||
if(msg.content === "pmme"){ | ||
console.log("yes we found it!"); | ||
mybot.setUsername("hydrabot").catch(function(err){ | ||
console.log(err); | ||
}); | ||
mybot.reply(msg, "You know what "+msg.sender+"? NO").then(function(msg){ | ||
mybot.updateMessage(msg, "wat i sed nothin m8"); | ||
}); | ||
mybot.getChannelLogs(msg.channel).then(function(logs){ | ||
console.log(logs[0]); | ||
}).catch(function(error){ | ||
console.log(error); | ||
}); | ||
} | ||
}); | ||
function success(){ | ||
console.log("login successful"); | ||
process.exit(0); | ||
} | ||
mybot.on("messageDelete", function (channel, message) { | ||
console.log("MESSAGE WAS DELETED BY " + (message ? message.author.username : channel.name)); | ||
}); | ||
mybot.on("messageUpdate", function (message, formerMessage) { | ||
console.log(message.author.username, "changed", formerMessage.content, "to", message.content); | ||
}); | ||
mybot.on("serverNewMember", function (user) { | ||
console.log("new user", user.username); | ||
}); | ||
mybot.on("serverRemoveMember", function (user) { | ||
console.log("left user", user.username); | ||
}); | ||
mybot.on("userUpdate", function (oldUser, newUser) { | ||
console.log(oldUser, "vs", newUser); | ||
}); | ||
mybot.on("channelCreate", function(chann){ | ||
console.log(chann); | ||
}) | ||
function error(){ | ||
console.log("login error, but the API works"); | ||
process.exit(0); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
266626
29
0
35
194
114646
3181