fix(gateway): remove 'offline' status from DiscordUpdatePresence, as Discord only supports 'invisible' and not 'offline' (#4205)

* fix: the 'color' type on role is set to 'undefined' when its value is '0'

* fix: ensure role color is correctly assigned when value is 0

* fix: revert color type change

* fix(docs): fixed typo in big bot guide

* fix(gateway): fixed an issue which would cause bot status to appear as online if the user used 'offline' as the status

* Update settings.json

* remove offline status in DiscordUpdatePresence.status

* Apply suggestions from code review

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
8au
2025-05-26 10:10:11 +05:30
committed by GitHub
co-authored by Awesome Stickz
parent 5cb7c1d1d2
commit a62fb5e17b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -299,7 +299,7 @@ export interface DiscordUpdatePresence {
/** The user's activities */
activities: DiscordBotActivity[]
/** The user's new status */
status: keyof typeof PresenceStatus
status: Exclude<keyof typeof PresenceStatus, 'offline'>
/** Whether or not the client is afk */
afk: boolean
}
@@ -309,6 +309,7 @@ export enum PresenceStatus {
online,
dnd,
idle,
invisible,
offline,
}