Add toggleable status and pfp change

This commit is contained in:
Ninjdai 2023-10-01 23:24:14 +02:00
parent 0c94666f03
commit e1cff46942
2 changed files with 17 additions and 9 deletions

View File

@ -12,5 +12,7 @@
"username": "user",
"password": "password"
},
"errorWebhookURL": "https://discord.com/api/webhooks/123456789/aBcDeFgHiJkLmNoPqRsTuVwXyZ"
}
"errorWebhookURL": "https://discord.com/api/webhooks/123456789/aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"cycleStatuses": true,
"cyclePfPs": true
}

View File

@ -1,4 +1,6 @@
import { ActivityType } from "discord.js";
import config from '../config.json' assert { type: 'json' };
export default {
name: 'ready',
once: true,
@ -32,12 +34,16 @@ export default {
setInterval(() => {
let Random = Math.floor(Math.random() * (status_list.length));
let Random2 = Math.floor(Math.random() * (profilepictures_list.length));
client.user.setActivity({
type: ActivityType.Custom,
name: "custom_status",
state: status_list[Random]
});
client.user.setAvatar(profilepictures_list[Random2]);
if(config.cycleStatuses){
client.user.setActivity({
type: ActivityType.Custom,
name: "custom_status",
state: status_list[Random]
});
}
if(config.cyclePfPs){
client.user.setAvatar(profilepictures_list[Random2]);
}
}, 300000);
}
}
}