Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
fix(SetGameCommand): do not assume that the client is ready/logged in (
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceEEC authored Jan 8, 2022
1 parent 0d1e228 commit 5474026
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/unique/setgame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ class SetGameCommand extends Command
return { type: 'PLAYING', name: `k!help | on ${totalGuilds} guilds` };
}

private setActivity(client: Client, [activity]: ActivityOptions[]): Promise<Presence[]>
private setActivity(client: Client, [activity]: ActivityOptions[]): Promise<(undefined | Presence)[]>
{
return Promise.all(
client.ws.shards.map((shard: WebSocketShard, shardId: number) =>
client.user!.setActivity({
client.user?.setActivity({
...activity,
name: `${activity.name} [${shardId}]`,
shardID: shardId,
Expand Down

0 comments on commit 5474026

Please sign in to comment.