This is the code I've got this far. I'd like it the channel name to be eg. "Online-was-Offline" if I switch from offline to online. How would I do that?
setInterval(async () => {
user = client.users.cache.get(config.user);
updated = client.users.cache.get(config.user).presence.status;
if(updated != status) {
status = updated;
if(updated == 'online') {
channel.setName('Online');
}
if(updated == 'offline') {
channel.setName('Offline');
}
if(updated == 'idle') {
channel.setName('Idle');
}
if(updated == 'dnd') {
channel.setName('DND');
}
message.edit(embed);
} else {
return
}
}, 1250);
Aucun commentaire:
Enregistrer un commentaire