Skip to content

Commit e423e85

Browse files
committed
expose uuid
1 parent 6e12156 commit e423e85

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/client/client.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ export class Client extends EventEmitter<Events> {
7070

7171
return true
7272
}
73+
74+
/**
75+
* Returns the current client UUID.
76+
*
77+
* Throws an error if read before the client is ready.
78+
*/
79+
public get uuid(): string {
80+
if (!this.ready) throw new Error('cannot read uuid before client is ready')
81+
return this._uuid!
82+
}
7383
// #endregion
7484

7585
// #region Lifecycle

0 commit comments

Comments
 (0)