# hackmud-chat

> A hackmud chat api wrapper for nodejs.

Latest version **0.5.1** (published 2018-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install hackmud-chat
pnpm add hackmud-chat
yarn add hackmud-chat
bun add hackmud-chat
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.1 |
| Published | 2018-08-08 |
| First published | 2018-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 3.1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Ryozuki |
| Maintainers | ryozuki |
| Keywords | hackmud, chat, wrapper, typescript |

## Links

- npm: https://www.npmjs.com/package/hackmud-chat
- Repository: https://github.com/hackmud-unofficial/hackmud-chat
- Homepage: https://github.com/hackmud-unofficial/hackmud-chat#readme
- Issues: https://github.com/hackmud-unofficial/hackmud-chat/issues
- npm.io page: https://npm.io/package/hackmud-chat

## Dependencies (4)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [request](https://npm.io/package/request.md) ^2.87.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.5
- [@types/request-promise-native](https://npm.io/package/@types/request-promise-native.md) ^1.0.15

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.5.1 (latest) — 2018-08-08
- 0.5.0 — 2018-08-08
- 0.4.1 — 2018-08-08
- 0.4.0 — 2018-07-25
- 0.3.2 — 2018-07-25
- 0.3.1 — 2018-07-24
- 0.3.0 — 2018-07-24
- 0.2.3 — 2018-07-09
- 0.2.2 — 2018-07-08
- 0.2.1 — 2018-07-08
- 0.2.0 — 2018-07-08
- 0.1.1 — 2018-07-08
- 0.1.0 — 2018-07-08
- 0.0.1 — 2018-07-08

## README

# hackmud-chat

Documentation: https://hackmud-unofficial.github.io/hackmud-chat

As this package is made with typescript, you don't need to install any typings.

You can also use it with javascript.

`npm install hackmud-chat --save`

## Example (in typescript)

```ts
import { ChannelMessage, HackmudApi, Message } from "hackmud-chat";

(async () => {

  const client = new HackmudApi(/* if you have a token (>5 chars) put it here */);
  await client.getToken("pass"); // otherwise get the token using the pass
  const account = await client.getAccountData();
  account.poll(async (messages: Message[]) => {
    if (messages && messages.length > 0) {
      for (const msg in messages) {
        if (messages[msg]) {
          const message = messages[msg];
          if (message instanceof ChannelMessage) {
            // tslint:disable-next-line:no-console
            console.log(message.toString());
            // message.channel.send("Hey!");
          }
        }
      }
    }
  });

})();
```

---
_Source: https://npm.io/package/hackmud-chat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
