Fixed activity
This commit is contained in:
parent
3d095676d3
commit
d0f47e5781
10
main.js
10
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 { token } = require('./config.json');
|
||||||
const fs = require('node:fs');
|
const fs = require('node:fs');
|
||||||
const path = require('node:path');
|
const path = require('node:path');
|
||||||
|
@ -11,6 +11,13 @@ const errorStatus = "[ERROR]: ";
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, 'GuildVoiceStates'],
|
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, 'GuildVoiceStates'],
|
||||||
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
|
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
|
||||||
|
presence: {
|
||||||
|
activities: [{
|
||||||
|
name: 'Use /help - MBot',
|
||||||
|
type: ActivityType.Playing
|
||||||
|
}],
|
||||||
|
status: 'idle'
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const player = new Player(client);
|
const player = new Player(client);
|
||||||
|
@ -44,7 +51,6 @@ for (const folder of commandFolders) {
|
||||||
|
|
||||||
client.once(Events.ClientReady, readyClient => {
|
client.once(Events.ClientReady, readyClient => {
|
||||||
try {
|
try {
|
||||||
client.user.setPresence({ activities: [{ name: 'Use /help - MBot' }], status: 'idle' });
|
|
||||||
console.log(informationStatus + `Activity has been set to '${client.user.presence.activities}'`);
|
console.log(informationStatus + `Activity has been set to '${client.user.presence.activities}'`);
|
||||||
console.log(informationStatus + `Status has been set to ${client.user.presence.status}`);
|
console.log(informationStatus + `Status has been set to ${client.user.presence.status}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue