Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xmtp/bot-kit-pro

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xmtp/bot-kit-pro

A database-backed bot framework for running high reliability XMTP bots

  • 0.2.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
7
Weekly downloads
 
Created
Source

Bot Kit Pro

Requirements

  • A Postgres database (tested with version 13 and above)
  • yarn package manager version 2.x or 3.x

Running tests

  1. yarn
  2. ./dev/up
  3. yarn test

Usage

Here is a minimal example of using bot-kit-pro in your application:

import { newBotConfig, run } from "@xmtp/bot-kit-pro"

async function start() {
  const config = newBotConfig(
    "test",
    {
      xmtpEnv: "production",
    },
    async (ctx) => {
      ctx.reply("hi")
    },
  )

  await run([config])
}

start()

Configuration

Bot Configuration

Each bot expects a configration, which can be created using newBotConfig.

You can also optionally provide application-level configuration to specify howt he database connection is established. The following environment variables are respected for app level configuration, and take precedence over any configuration values provided in code.

  • POSTGRES_CONNECTION_STRING

If no application config is specified, default values are provided that correspond with the DB in the docker-compose.yml file.

Bot State Management

TODO

Viewing Bot State

TODO

Keywords

FAQs

Package last updated on 20 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc