adamant-botfactory
TypeScript icon, indicating that this package has built-in type declarations

0.2.10 • Public • Published

botfactory

Minimalist bot framework for ADAMANT.

Installation

You can install it using one of the popular package managers, e.g. using npm:

npm install adamant-botfactory

Example

import { createBot } from "adamant-botfactory";

const nodes = [
  "http://localhost:36666",
  "https://endless.adamant.im",
  // ...
];

const bot = createBot(process.env.PASS_PHRASE, {
  nodes,
});

bot.command("start", async (usr) => {
  const res = await usr.balance();

  usr.reply(`Hello! Your balance is ${res.balance}.`);
});

bot.start();

Readme

Keywords

Package Sidebar

Install

npm i adamant-botfactory

Weekly Downloads

3

Version

0.2.10

License

GPL-3.0

Unpacked Size

42.7 kB

Total Files

6

Last publish

Collaborators

  • martiliones