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