In v14, you will need to use the ActivityType
enums or numbers.
You can import it from discord.js
:
const { Client, GatewayIntentBits, ActivityType } = require('discord.js');
And use it like this:
client.user.setPresence({
activities: [{ name: `discord.js v14`, type: ActivityType.Watching }],
status: 'dnd',
});
List of ActivityType
s:
v13 | v14 | v14 value |
---|---|---|
"COMPETING" |
ActivityType.Competing |
5 |
"CUSTOM" |
ActivityType.Custom |
4 |
"LISTENING" |
ActivityType.Listening |
2 |
"PLAYING" |
ActivityType.Playing |
0 |
"STREAMING" |
ActivityType.Streaming |
1 |
"WATCHING" |
ActivityType.Watching |
3 |