diff --git a/src/Client.ts b/src/Client.ts index 7e90e61b..994bdad1 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -286,6 +286,15 @@ export class Client extends EventEmitter { 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 */