#Custom Status for Bots

1 messages · Page 1 of 1 (latest)

broken relic

Setting a Custom Status for Your App (v14.13.0+)

You no longer have to use "listening", "watching", "playing" prefixes for your bot activity!

  • Setting a custom status with ClientUser#setPresence (use this if you want to set other presence fields like the status (online, idle, dnd))
const { ActivityType } = require('discord.js');
client.user.setPresence({
    activities: [{
         type: ActivityType.Custom,
         name: "custom", // name is exposed through the API but not shown in the client for ActivityType.Custom
         state: "🍋"
    }]
})
const { ActivityType } = require('discord.js');
client.user.setActivity({
    type: ActivityType.Custom,
    name: "custom", // name is exposed through the API but not shown in the client for ActivityType.Custom
    state: "🍋"
})
const { Client, GatewayIntentBits, ActivityType } = require('discord.js');
new Client({
    intents: [GatewayIntentBits.Guilds],
    presence: {
        activities: [{
            type: ActivityType.Custom,
            name: "custom", // name is exposed through the API but not shown in the client for ActivityType.Custom
            state: "🍋"
        }]
    }
});
  • ℹ️ Emojis are currently not supported in custom status for bots (you can put an emoji as state, as shown above, but it will be part of the state, not a proper custom status emoji)
  • ℹ️ You can also supply state with the other activity types for an additional surface to display custom text in your bot's activity!