Info about the player.
You can wait for player initialization via promise or event:
await connector.player.ready;
console.log(connector.player.name);
console.log(connector.player.avatar);
// or subscribe to event
connector.player.on("ready", () => {
console.log(connector.player.name);
console.log(connector.player.avatar);
});
// subscribe to player info change
connector.player.on("changed", () => {});
Members
(static) ready :Promise
Returns promise you can use to wait for player init
Type:
- Promise
(static) name :string
Player name
Type:
- string
(static) firstName :string
Player first name
Type:
- string
(static) lastName :string
Player last name
Type:
- string
(static) id :string
Player id
Type:
- string
(static) avatar :string
Player avatar URL
Type:
- string