Fixed activity

This commit is contained in:
Patrick Hatsune 2024-07-08 19:54:01 -07:00
parent 3d095676d3
commit d0f47e5781
Signed by: keyemail
GPG key ID: 6FD1A0FDB0D914C2

12
main.js
View file

@ -1,4 +1,4 @@
const { Client, Collection, Events, EmbedBuilder, GatewayIntentBits, Partials } = require('discord.js');
const { Client, Collection, Events, EmbedBuilder, GatewayIntentBits, Partials, ActivityType } = require('discord.js');
const { token } = require('./config.json');
const fs = require('node:fs');
const path = require('node:path');
@ -11,6 +11,13 @@ const errorStatus = "[ERROR]: ";
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, 'GuildVoiceStates'],
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
presence: {
activities: [{
name: 'Use /help - MBot',
type: ActivityType.Playing
}],
status: 'idle'
}
});
const player = new Player(client);
@ -43,8 +50,7 @@ for (const folder of commandFolders) {
}
client.once(Events.ClientReady, readyClient => {
try {
client.user.setPresence({ activities: [{ name: 'Use /help - MBot' }], status: 'idle' });
try {
console.log(informationStatus + `Activity has been set to '${client.user.presence.activities}'`);
console.log(informationStatus + `Status has been set to ${client.user.presence.status}`);
} catch (error) {