Fixed activity
This commit is contained in:
parent
3d095676d3
commit
d0f47e5781
12
main.js
12
main.js
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue