SoulFire LogoSoulFire

BotSession

Public Python members of BotSession.

Generated from the pinned SDK source. Use the matching installation. Each source link points to this baseline.

Methods decorated with @fn return effects. Their implementation signatures use EffectGen for the generator body. Compose them with yield from inside a scoped workflow.

open

@classmethod
@fn("BotSession.open")
def open(
    cls, stream: BotEventStreamFactory, options: BotSessionOptions | None = None
) -> EffectGen[BotSession, SoulFireOperationError, Scope]

Source

state

@property
def state(self) -> BotSessionState

Source

events

def events(self) -> Stream[BotEvent, SoulFireOperationError]:
    @gen

Source

wait_for

def wait_for(
    self,
    predicate: Callable[[BotEvent, BotSessionState], bool],
    *,
    timeout: float | None = None,
) -> Effect[BotEvent, SoulFireOperationError]:
    @gen

Source

once

def once(
    self, event_name: str, *, timeout: float | None = None
) -> Effect[BotEvent, SoulFireOperationError]

Source

close

@fn("BotSession.close")
def close(self) -> EffectGen[None]

Source

How is this page?

Last updated on

On this page