Skip to content

Conversation

@Anatoly03
Copy link
Owner

@Anatoly03 Anatoly03 commented Dec 5, 2024

  • Move game connection logic to field instead of inheritance f981f54
  • Add Game.sendChat method ff9897c
  • Add Game.selfId field (contains bots' self id after init) 806937b
  • Fix process is not defined in browser environment 9bb3c7e

Motivating Examples

import "dotenv/config"
import { LobbyClient } from "pixelwalker.js"

export const client = LobbyClient.withToken(process.env.token);
export const game = await client.connection(process.env.world_id);

game.connection.on('playerInitPacket', message => {
    game.sendChat(`Connected as ${game.selfId}!`)
})

connection.bind();

@Anatoly03 Anatoly03 self-assigned this Dec 5, 2024
@Anatoly03 Anatoly03 merged commit 97c50a6 into main Jan 11, 2025
1 check passed
@Anatoly03 Anatoly03 deleted the update-5 branch January 11, 2025 15:08
@Anatoly03 Anatoly03 mentioned this pull request Jan 11, 2025
@Anatoly03 Anatoly03 restored the update-5 branch January 11, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants