mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 15:11:32 +00:00
fixed role stuff
This commit is contained in:
parent
9063aa8abf
commit
ab15c45d96
3 changed files with 20 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
|
@ -308,7 +308,7 @@ class Role {
|
|||
* positive number if the first's is higher (second's is lower), 0 if equal
|
||||
*/
|
||||
static comparePositions(role1, role2) {
|
||||
if (role1.position === role2.position) return role1.id - role2.id;
|
||||
if (role1.position === role2.position) return role2.id - role1.id;
|
||||
return role1.position - role2.position;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ client.on('ready', () => {
|
|||
});
|
||||
|
||||
client.on('presenceUpdate', (o, n) => {
|
||||
if (o.username.startsWith('U'))
|
||||
if (o.username.startsWith('hydr'))
|
||||
console.log(o.username, o.presence.status, n.presence.status);
|
||||
});
|
||||
|
||||
|
|
@ -37,6 +37,23 @@ client.on('message', message => {
|
|||
}
|
||||
}
|
||||
|
||||
if (message.content === 'imma queue pls') {
|
||||
let count = 0;
|
||||
let ecount = 0;
|
||||
for(let x = 0; x < 4000; x++) {
|
||||
message.channel.sendMessage(`this is message ${x} of 3999`)
|
||||
.then(m => {
|
||||
count++;
|
||||
console.log('reached', count, ecount);
|
||||
})
|
||||
.catch(m => {
|
||||
console.error(m);
|
||||
ecount++;
|
||||
console.log('reached', count, ecount);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (message.content === 'myperms?') {
|
||||
message.channel.sendMessage('Your permissions are:\n' +
|
||||
JSON.stringify(message.channel.permissionsFor(message.author).serialize(), null, 4));
|
||||
|
|
|
|||
Loading…
Reference in a new issue