import { T } from "@simplex-chat/types"; import * as api from "./api"; import * as core from "./core"; import * as util from "./util"; export type BotDbOpts = api.DbConfig & { confirmMigrations?: core.MigrationConfirmation; }; export interface BotOptions { createAddress?: boolean; updateAddress?: boolean; updateProfile?: boolean; addressSettings?: api.BotAddressSettings; allowFiles?: boolean; commands?: T.ChatBotCommand[]; useBotProfile?: boolean; logContacts?: boolean; logNetwork?: boolean; } export interface BotConfig { profile: T.Profile; dbOpts: BotDbOpts; options: BotOptions; onMessage?: (chatItem: T.AChatItem, content: T.MsgContent) => void | Promise; onCommands?: { [K in string]?: ((chatItem: T.AChatItem, command: util.BotCommand) => void | Promise); }; events?: api.EventSubscribers; } export declare function run({ profile, dbOpts, options, onMessage, onCommands, events }: BotConfig): Promise<[api.ChatApi, T.User, T.UserContactLink | undefined]>;