Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

162
Visualizações
How to change the status of discord bot node.js

I want to change the stats of my discord bot from online to something like idle or dnd.

This is what I have tried so far that has not worked:

client.on("ready", () => {
    client.user.setStatus('dnd'),
    client.user.setActivity('CrashGaming', { type: "WATCHING"}).catch(console.error)
});
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You're using a comma, remove the comma. Hope it'll work

client.on("ready", () => {
    client.user.setStatus('dnd') // remove comma from here
    client.user.setActivity('CrashGaming', { type: "WATCHING"}).catch(console.error)
});

Let me know if it works.

about 4 years ago · Juan Pablo Isaza Relatório

0

If you're using discord.js v14, you will need to use the ActivityType enums or numbers.

You can import it from discord.js:

const { 
  ActivityType,
  Client,
  GatewayIntentBits,
} = require('discord.js');

And use it like this:

client.on('ready', () => {
  client.user.setStatus('dnd');
  client.user.setActivity('CrashGaming', { type: ActivityType.Watching });
});

List of ActivityTypes you can use:

v13 v14 v14 value
"PLAYING" ActivityType.Playing 0
"STREAMING" ActivityType.Streaming 1
"LISTENING" ActivityType.Listening 2
"WATCHING" ActivityType.Watching 3
"COMPETING" ActivityType.Competing 5
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda