10 |
console.log(status); |
console.log(status); |
11 |
|
|
12 |
await this.client.user?.setActivity({ |
await this.client.user?.setActivity({ |
13 |
type: type ?? 'WATCHING', |
type: type ?? this.client.config.props.global.status.name ?? 'WATCHING', |
14 |
name: name ?? 'over the server' |
name: name ?? this.client.config.props.global.status.type ?? 'over the server' |
15 |
}); |
}); |
16 |
|
|
17 |
|
this.client.config.props.global.status = type || name ? {} : null; |
18 |
|
|
19 |
|
if (name) { |
20 |
|
this.client.config.props.global.status.name = name; |
21 |
|
} |
22 |
|
|
23 |
|
if (type) { |
24 |
|
this.client.config.props.global.status.type = type; |
25 |
|
} |
26 |
|
|
27 |
await this.client.user?.setStatus(status!); |
await this.client.user?.setStatus(status!); |
28 |
|
await this.client.config.write(); |
29 |
} |
} |
30 |
} |
} |