@okitan/obslack
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

@okitan/obslack

Slack Message Manager

install

$ npm install @okitan/obslack ink react

Usage

const { ObSlack } = require("obslack");
const { WebClient } = require("@slack/client");

const client = new WebClient(YOUR_TOKEN);

const obslack = new ObSlack({ client });

obslack.start({
  channel: "#general",
  message: { text: "hello world" },
  callback: (observer) => {
    observer.next({ text: "and this will shown in thread" });

    observer.complete();
  },
});

// and this is posted in another thread
obslack.start({
  channel: "#general",
  message: { text: "hello world2" },
  update: true,
  callback: (observer) => {
    observer.next({ text: "hello world3" }); // update original message

    observer.complete();
  },
});

See also examples directory.

output to console

Sometimes you may want to do without slack. obslack try to emulate Slack message output to your console.

Readme

Keywords

none

Package Sidebar

Install

npm i @okitan/obslack

Weekly Downloads

108

Version

2.2.1

License

ISC

Unpacked Size

49.2 kB

Total Files

39

Last publish

Collaborators

  • okitan