Guides

User Emoji StatusesBOT-ONLY

Bot Walkthrough 10 of 18

Bots can set and remove emoji statuses for users who allow them to do so.

Setting an Emoji Status

Use setUserEmojiStatus with a custom emoji ID.

await client.setUserEmojiStatus(userId, {
  type: "customEmoji",
  customEmojiId,
});

Pass until as a future Unix timestamp in seconds to remove the status automatically.

const until = Math.floor(Date.now() / 1_000) + 60 * 60;

await client.setUserEmojiStatus(userId, {
  type: "customEmoji",
  customEmojiId,
}, { until });

Removing an Emoji Status

Use removeUserEmojiStatus to remove the user’s current emoji status.

await client.removeUserEmojiStatus(userId);