Add token + 2.0.4
This commit is contained in:
parent
b9aa613e1d
commit
f3c87e1c84
2 changed files with 3 additions and 3 deletions
|
@ -124,12 +124,12 @@ export class Client extends (EventEmitter as new () => TypedEmitter<MessageEvent
|
|||
}).toBinary()
|
||||
);
|
||||
}
|
||||
constructor(url: string) {
|
||||
constructor(url: string, token?: string) {
|
||||
super();
|
||||
this.ws = new WebSocket(url.replace("http", "ws"), {
|
||||
//@ts-expect-error
|
||||
headers: {
|
||||
Origin: url,
|
||||
Origin: url + (token ? ("?t=" + token) : ""),
|
||||
"User-Agent": new UserAgent().toString(),
|
||||
},
|
||||
protocol: "pianoverse",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "pianoverse",
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
"version": "v2.0.3",
|
||||
"version": "v2.0.4",
|
||||
"license": "GPL-3.0-only",
|
||||
"homepage": "https://git.sad.ovh/sophie/pianoverse",
|
||||
"bugs": "https://git.sad.ovh/sophie/pianoverse/issues",
|
||||
|
|
Loading…
Reference in a new issue