What is the difference between setActivity and setPresence?

They are basicly the same, with both you can set a playing/watching etc. status. But with the setPresence you can also set the Online, Invisible, Do Not Disturb and Idle for your bot. Here is are some examples:

client.user.setActivity(`a game`, {type: 'PLAYING'});
// will set the bot's activity to 'Playing a game' with the status online

bot.user.setPresence({
   status: 'dnd',
   activity: {
      name: 'a video',
       type: 'WATCHING'
    }
 });
 // will set the bot's activity to 'Watching a video' with the status Do Not Disturb

Leave a Comment