redo the client user presence stuff

This commit is contained in:
Amish Shah
2016-09-27 17:57:39 +01:00
parent 38366f627d
commit 045153584a
5 changed files with 82 additions and 46 deletions

View File

@@ -10,10 +10,17 @@ const { email, password, token, usertoken } = require('./auth.json');
client.login(token).then(atoken => console.log('logged in with token ' + atoken)).catch(console.log);
client.ws.on('send', console.log);
client.on('ready', () => {
console.log('ready!');
});
client.on('presenceUpdate', (o, n) => {
if (o.username.startsWith('U'))
console.log(o.username, o.presence.status, n.presence.status);
});
client.on('channelCreate', channel => {
console.log(`made ${channel.name}`);
});