UNPKG

@nekiro/kick-api

Version:

Efortlessly query kick.com api using easy to use interface with properly typed responses.

42 lines (41 loc) 1.21 kB
import type { ChatMessageRequest, ChatMessageResponse } from "../types"; import { KickClient } from "../client"; export declare class ChatModule { private client; private readonly baseRoute; constructor(client: KickClient); /** * Send a chat message as either a bot or user * * @param params - Message parameters with conditional requirements: * - For bot messages: only content and type are required * - For user messages: broadcaster_user_id is also required * * @example Bot message * ```typescript * await client.chat.postMessage({ * type: "bot", * content: "Hello from bot!" * }); * ``` * * @example User message * ```typescript * await client.chat.postMessage({ * type: "user", * broadcaster_user_id: 12345, * content: "Hello from user!" * }); * ``` * * @example Reply message * ```typescript * await client.chat.postMessage({ * type: "bot", * content: "This is a reply!", * reply_to_message_id: "original_message_id" * }); * ``` */ postMessage(params: ChatMessageRequest): Promise<ChatMessageResponse>; }