Updating status changer and

moving statuses to sepereate file
This commit is contained in:
2023-11-18 19:54:07 +01:00
parent 3d5c83ad63
commit 5c88f2f4d3
2 changed files with 25 additions and 19 deletions

9
config/statuses.json Normal file
View File

@@ -0,0 +1,9 @@
[
{ "name": "over the Illegitimate Server", "type": 3 },
{ "name": "for Martina's return", "type": 3 },
{ "name": "w vri's feelings", "type": 0 },
{ "name": "urCryhard steal finals again", "type": 3 },
{ "name": "with Perlcence the AI", "type": 0 },
{ "name": "with ur mom in my bed", "type": 0 },
{ "name": "with Jone the idiot", "type": 0 }
]

View File

@@ -1,4 +1,4 @@
const { Events, ActivityType } = require('discord.js');
const statuses = require('../../config/statuses.json')
module.exports = {
name: 'status',
@@ -6,31 +6,28 @@ module.exports = {
type: 'ready',
/** @param { import('discord.js').Client } client */
execute(client) {
client.user.setActivity(
{ name: "over the Illegitimate Server", type: ActivityType.Watching }
);
const activities = [
{ name: "for Martina's return", type: ActivityType.Watching },
{ name: "w vri's feelings", type: ActivityType.Playing },
{ name: "urCryhard steal finals again", type: ActivityType.Watching },
{ name: "with Perlcence the AI", type: ActivityType.Playing },
{ name: "with ur mom in my bed", type: ActivityType.Playing },
{ name: "with Jone the idiot", type: ActivityType.Playing },
{ name: "over the Illegitimate Server", type: ActivityType.Watching }
];
execute(client) {
// Playing 0
// Streaming 1
// Listening 2
// Watching 3
// Custom 4
// Competing 5
client.user.setActivity(
{ name: statuses[0].name, type: 3}
);
let i = 0;
setInterval(() =>
client.user.setActivity(
activities[i++ % activities.length]
statuses[i = 1, i++ % statuses.length]
),
1000 * 60 * 30
1000 * 60 * 10
)
client.on(Events.ClientReady, () => {
client.user.setStatus('dnd');
});
client.user.setStatus('dnd');
}
}