Change how presences are handled

This commit is contained in:
Amish Shah
2016-09-25 14:15:58 +01:00
parent 0e8f1bef97
commit 03651fd6e3
11 changed files with 169 additions and 90 deletions

View File

@@ -6,7 +6,7 @@ const fs = require('fs');
const client = new Discord.Client({ fetch_all_members: false, api_request_method: 'sequential' });
const { email, password, token } = require('./auth.json');
const { email, password, token, usertoken } = require('./auth.json');
client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.log);
@@ -18,28 +18,6 @@ client.on('channelCreate', channel => {
console.log(`made ${channel.name}`);
});
client.on('guildMemberAdd', (g, m) => {
console.log(`${m.user.username} joined ${g.name}`);
})
let c = 0;
client.on('channelUpdate', () => {
c++; console.log(c);
});
client.on('guildMemberUpdate', () => {
c++; console.log(c);
});
client.on('channelPinsUpdate', () => {
c++; console.log(c);
});
client.on('presenceUpdate', () => {
c++; console.log(c);
});
client.on('debug', console.log);
client.on('message', message => {