Added phone roles for all statuses
This commit is contained in:
parent
1c1157893e
commit
eb018782c7
@ -1,6 +1,6 @@
|
||||
// Komandy nebo handelery který se nikam jinam nehodí
|
||||
|
||||
const role = { online: '684443816383610916', idle: '684444083065978941', dnd: '684444020558135399', offline: '684443903759614049', onlinephone: '777989420728975390' };
|
||||
const role = { online: '684443816383610916', idle: '684444083065978941', dnd: '684444020558135399', offline: '684443903759614049', onlinephone: '777989420728975390', idlephone: "836554207342362626", dndphone: "836554469478760449" };
|
||||
const spoustece = ['mares', 'mareš', 'purfie', 'denim', '<@!477202009066438668>'];
|
||||
const emouty = ['purfiek3:616026189269696512', 'purfiek3:616026189269696512', 'purfiek3:616026189269696512', 'purfieUchyl:576487602203525138', 'bafW:574646319696576532', 'purfiek4:616026180889477258'];
|
||||
const rand = max => Math.floor(Math.random() * max);
|
||||
@ -23,8 +23,10 @@ module.exports = {
|
||||
if (aft.guild.id !== '555779161067749446' || process.env.IGNORE_PRESENCE) return;
|
||||
|
||||
if (!bef) bef = { status: 'offline', clientStatus: {} };
|
||||
if (bef.clientStatus.mobile === 'online' && bef.clientStatus.desktop !== 'online') bef.status = 'onlinephone';
|
||||
if (aft.clientStatus.mobile === 'online' && aft.clientStatus.desktop !== 'online') aft.status = 'onlinephone';
|
||||
[bef, aft].forEach(s => {
|
||||
const mobile = s.clientStatus.mobile;
|
||||
if (mobile && mobile !== s.clientStatus.desktop) s.status = `${mobile}phone`;
|
||||
});
|
||||
if (bef.status === aft.status) return;
|
||||
|
||||
aft.member.roles.add(role[aft.status]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user