Skip to main content
Corvus Connection

IChatApi

Interface
TheOmenDen.StreamPulse.Scripting.IChatApiChat operations available inside a script handler. Implementations are bound to a single invocation — sending uses the broadcaster channel captured when the invocation began, and Subscribe creates a stream whose lifetime ends when the invocation ends.

Members

3
  • ReplyAsync
    method
    Task ReplyAsync(string text, CancellationToken cancellationToken = default)
    Sends a chat message in reply to the chat message that triggered this invocation. Falls back to a regular send if the invocation isn't a chat trigger.
  • SendAsync
    method
    Task SendAsync(string text, CancellationToken cancellationToken = default)
    Sends a chat message to the broadcaster's channel as the bot.
  • Subscribe
    method
    IChatSubscription Subscribe(CancellationToken cancellationToken = default)
    Opens an IChatSubscription that streams every subsequent chat message on the broadcaster's channel. Intended for long-running handlers (e.g., OnStreamOnlineAttribute) that want to react to chat over time without registering a separate OnChatMessageAttribute method.