Skip to content

Client Status

Table of Contents


Bot Status

Customizing Bot Status

To customize your bot’s status, add the following code to your main file:

1
client.status({
2
name: string,
3
type: string,
4
time: number,
5
url?: string,
6
afk?: boolean,
7
});

When using sharding, you can individually change the status of each shard:

1
client.status({
2
name: string,
3
type: string,
4
time: number,
5
shard: number
6
});

Replace string, number, and boolean with appropriate values. Here’s an example:

1
client.status({
2
name: "Example Text!",
3
type: "PLAYING",
4
time: 12
5
});

You can have multiple statuses by adding multiple client.status({...}) calls:

1
client.status({
2
name: "Example Text one!",
3
type: "PLAYING",
4
time: 12
5
});
6
7
client.status({
8
name: "Example Text two!",
9
type: "STREAMING",
10
time: 25,
11
url: "some URL"
12
});
13
14
client.status({
15
name: "Doing nothing..", // Normal status like any other Discord user without any state.
16
time: 50,
17
type: "CUSTOM"
18
});

Status Types

There are various types of statuses (not case-sensitive):

  • PLAYING
  • WATCHING
  • STREAMING
  • LISTENING
  • COMPETING
  • CUSTOM

Client Presence

You can also set the bot’s presence by adding the status property, for example:

1
client.status({
2
name: "Example Text!",
3
type: "PLAYING",
4
status: "dnd",
5
time: 12
6
});

Presence Types

Available presence statuses:

  • online
  • idle
  • dnd
  • invisible