Migrated dynamic bot status

This commit is contained in:
2023-11-07 15:26:32 +01:00
parent 962ab57c8d
commit f7ec430006
2 changed files with 17 additions and 1 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules/
config.json
config.json
old/

15
timers/botStatus.js Normal file
View File

@@ -0,0 +1,15 @@
const { ActivityType } = require('discord.js');
module.exports = {
timeout: 5 * 60 * 1000,
immediate: true,
name: 'Bot Status',
data: {
statusIndex: 0,
animeList: ["K-On!", "Spice and Wolf", "Bakemonogatari", "Your Lie in April", "Noragami", "Puella Magi Madoka Magica", "Akame ga Kill!", "Steins;Gate", "\u3086\u308b\u30ad\u30e3\u30f3\u25b3"]
},
async tick(client, timer) {
client.user.setActivity(timer.data.animeList[timer.data.statusIndex], { type: ActivityType.Watching });
timer.data.statusIndex = (timer.data.statusIndex + 1) % timer.data.animeList.length
},
};