Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
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(" ")}` }],
    });
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!