Bot discord set activity

Here is a possible solution:

  1. Make array of the presence action alone.
var word = ["the world", "with a cat"];
  1. Check what word[i] is and make presence accordingly.
if (word[i] === "the world") {
   let action = "{ type: 'WATCHING' }";
   client.user.setActivity(args[i], JSON.parse(action));
} else if (word[i] === "with a cat") {
   let action = "{ type: 'PLAYING' }";
   client.user.setActivity(args[i], JSON.parse(action));
} else {
   // something else 
}