aboutsummaryrefslogtreecommitdiff
path: root/bot/src/events/ClientReady.js
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-02 22:27:57 -0500
committerAndrew Lee <andrew@alee14.me>2025-03-02 22:27:57 -0500
commitcf1382d88c5e3298923c8cb243b7bc5751e68b53 (patch)
treea38351317594ed660fc80c784cdf7dbc71f5656b /bot/src/events/ClientReady.js
parent1c253d25cb1d35aa987d76e07806999c562712d6 (diff)
downloadAleeBot-cf1382d88c5e3298923c8cb243b7bc5751e68b53.tar.gz
AleeBot-cf1382d88c5e3298923c8cb243b7bc5751e68b53.tar.bz2
AleeBot-cf1382d88c5e3298923c8cb243b7bc5751e68b53.zip
Ported more commands; Made embed colour a const; Cleanup
Diffstat (limited to 'bot/src/events/ClientReady.js')
-rw-r--r--bot/src/events/ClientReady.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/bot/src/events/ClientReady.js b/bot/src/events/ClientReady.js
index c3c6055..335a2ac 100644
--- a/bot/src/events/ClientReady.js
+++ b/bot/src/events/ClientReady.js
@@ -1,21 +1,23 @@
import { Events } from 'discord.js';
import { readFileSync } from 'node:fs';
-import { activities as activity } from '../storage/activities.js';
+import { activities } from '../storage/activities.js';
+const { version } = JSON.parse(readFileSync('./package.json', 'utf-8'));
function botActivity(client) {
+ const activity = activities[Math.floor(Math.random() * activities.length)];
+
client.user.setPresence({
activities: [{
- name: activity[Math.floor(Math.random() * activity.length)]
+ name: activity.name,
+ type: activity.type
}],
status: 'online',
afk: false,
});
- console.log(`[>] Updated bot presence to "${client.user.presence.activities[0].name}"`);
+ console.log(`[>] Updated bot presence to "${activity.name}"`);
}
-const { version } = JSON.parse(readFileSync('./package.json', 'utf-8'));
-
export default {
name: Events.ClientReady,
once: true,