TypeScript SDK
Run scoped bot operations with TypeScript and Effect v4.
bun add @soulfiremc/sdk@2.10.2 effect@^4import { Effect } from "effect";
import { SoulFire } from "@soulfiremc/sdk/bun";
const program = Effect.scoped(
Effect.gen(function* () {
const bot = yield* SoulFire.createBot({
server: "localhost:25565",
username: "DocsBot_1",
installation: { version: "2.10.2" },
});
yield* bot.chat.send("Hello from SoulFire");
yield* Effect.logInfo(`Health: ${bot.state.player?.health}`);
}),
);
await Effect.runPromise(program);