Code Not working

const Discord = require('discord.js');

const client = new Discord.Client({
  intents: {
    typing: false,
    presences: false
  }
});

client.on('ready', async () => {
  console.log('Logged in as ' + client.user.name);
  updatePresence();
});

const updatePresence = () => {
  setInterval(() => {
    const currentTime = new Date().toLocaleString('en-US', {
      weekday: 'long',
      hour: 'numeric',
      minute: 'numeric',
      hour12: true
    });

    client.user.setPresence({
      activity: {
        type: 'watching',
        name: currentTime
      }
    });
  }, 60000);
};

client.login('');
Was this page helpful?