slack-real-time-messaging

1.0.0-beta.3 • Public • Published


npm npm npm npm npm

The Slack Real Time Messaging module is a WebSocket-based API that allows
you to create advanced Slack Bots to send and receive messages in real time.

Documentation · My other Modules · Buy me a Coffee

Made with ♥ by Jeffrey Lanters



Hard work in progress!!

This package is currently is developement. You can use the beta version to test the current build, but keep in mind future changes may be made. Thanks for testing!

Installation

Install using npm.

$ npm install slack-real-time-messaging@1.0.0-beta.3

Example usage

IN DEVELOPMENT

const rtmClient = new RTMClient({
  token: "..."
});
 
rtmClient.addListener("start", async _slack => {
  const _user = await rtmClient.getUser("jeffrey2");
  rtmClient.postMessageToUser(
    "jeffrey2",
    _user.is_admin ? "Hey boss!" : "Hey!"
  );
  rtmClient
    .postMessageToUser("jeffrey2", "Hey!")
    .then(_message => {})
    .catch(_reason => {
      console.log("Error");
      console.log(_reason);
    });
});

Readme

Keywords

Package Sidebar

Install

npm i slack-real-time-messaging

Weekly Downloads

3

Version

1.0.0-beta.3

License

ISC

Unpacked Size

26.9 kB

Total Files

22

Last publish

Collaborators

  • jefflanters