Skip to content

Commit

Permalink
Add custom status support
Browse files Browse the repository at this point in the history
  • Loading branch information
Blocksnmore committed Feb 8, 2024
1 parent 824e70c commit e926c7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/structures/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ export class ClientPresence {
else {
activity.map((e) => {
if (typeof e.type === 'string') e.type = ActivityTypes[e.type]

if (e.type === ActivityTypes.CUSTOM_STATUS) {
e.state = e.name
e.name = 'Custom Status'
}

return e
})
return activity
Expand Down
2 changes: 2 additions & 0 deletions src/types/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export interface ActivityGame {
name: string
type: 0 | 1 | 2 | 3 | 4 | 5 | ActivityType
url?: string
/** Used for CUSTOM_STATUS */
state?: string
}

export interface ClientActivity {
Expand Down

0 comments on commit e926c7b

Please sign in to comment.