Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
set status command doesn't set status

This should change the status and activity but for some reason, it only changes the status not the activity.

const args = message.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();

if (command == "status") {
    if (!args[2]) {
        return message.channel.send({ content: "Usuage: {prefix}{command} {online/idle etc} {type} {status}" });
    }

    client.user.setPresence({
        status: `${args[0]}`,
        activities: [{ type: `${args[1]}`, name: `${args.slice(2).join(" ")}` }],
    });
}
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

If you're using v12:

if(!args[2]){ return message.channel.send({ content: 'Usuage: {prefix}{command} {online/idle etc} {type} {status}' }) }

client.user.setPresence({
  status: `${args[0]}`,
  activity: { type: `${args[1].toUpperCase()}`, name: `${args.slice(2).join(' ')}` }
});

And if you're using v13:

if(!args[2]){ return message.channel.send({ content: 'Usuage: {prefix}{command} {online/idle etc} {type} {status}' }) }

client.user.setPresence({
  status: `${args[0]}`,
  activities: [{ type: `${args[1].toUpperCase()}`, name: `${args.slice(2).join(' ')}` }]
}); 

Make sure that args[1] is in caps (e.g: PLAYING, WATCHING)
Note that bots cannot set a CUSTOM activity type, it is only for custom statuses received from users

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda