feat: add authenticatorHeader helper

This commit is contained in:
Paul Makles
2025-02-10 15:34:02 +00:00
parent 7a66b8f9d5
commit 4103bda89f
+9
View File
@@ -286,6 +286,15 @@ export class Client extends EventEmitter<Events> {
return typeof this.#session === "string" ? undefined : this.#session?._id;
}
/**
* Get authentication header
*/
get authenticationHeader() {
return typeof this.#session === "string"
? ["X-Bot-Token", this.#session]
: ["X-Session-Token", this.#session?.token as string];
}
/**
* Connect to Revolt
*/