mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
27 lines
737 B
JavaScript
27 lines
737 B
JavaScript
var Discord = require("../lib/index.js");
|
|
var Auth = require("./auth.json");
|
|
var mybot = new Discord.Client();
|
|
|
|
mybot.login(Auth.email, Auth.password, function(err, res){
|
|
|
|
});
|
|
|
|
mybot.on("ready", function(){
|
|
console.log("Ready!");
|
|
})
|
|
|
|
mybot.on("message", function(msg){
|
|
console.log("Another message by "+msg.author.username+"... now I have "+mybot.messages.length + " I have been online for " + mybot.uptime);
|
|
})
|
|
|
|
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);
|
|
|
|
}) |