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.0.1 to 3.0.2

.travis.yml

10

lib/Client.js

@@ -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);
}
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