mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Change how presences are handled
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user