# mixerstatus-discordbot

> This node bot allows to post mixer.com status updates to a discord channel using webhooks.

Latest version **1.0.0** (published 2017-12-23) · 0 weekly downloads

## Install

```sh
npm install mixerstatus-discordbot
pnpm add mixerstatus-discordbot
yarn add mixerstatus-discordbot
bun add mixerstatus-discordbot
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-12-23 |
| First published | 2017-12-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+4 in 3 direct dependencies) |
| Install scripts | no |
| Author | Alexandre Kilian |
| Maintainers | alexandrek |

## Links

- npm: https://www.npmjs.com/package/mixerstatus-discordbot
- npm.io page: https://npm.io/package/mixerstatus-discordbot

## Dependencies (4)

- [ws](https://npm.io/package/ws.md) ^3.3.3
- [merge](https://npm.io/package/merge.md) ^1.2.0
- [carina](https://npm.io/package/carina.md) ^0.10.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^1.7.3

## Recent versions

- 1.0.0 (latest) — 2017-12-23

## README

# Mixer Status Discord bot

This node bot allows to post mixer.com status updates to a discord channel using webhooks.

## 1. Installation

To install the latest version

```sh
yarn add mixerstatus-discordbot
```


## 2. Usage

Import the class and configure

```js 
    const MixerDiscordBot = require('./index');
    const config = {
        channelId: 000,
        webhook: 'https://discordapp.com/api/webhooks/XX/YYY'
    };

    const botInstance = new MixerDiscordBot(config);

    botInstance.start();
```


### 2.1 Config and Options

The bot has two parameter objects, config (required) and options (optional)

#### Config

| Key | Value | Required|
|-----|-------|-------------|
| channelId | Mixer Channel ID | YES |
| webhook | Discord Webhook URL | YES |

#### Options

| Key | Value | Required | Description | Default |
|-----|-------|----------|-------------| ---------|
| notifyOnStart | boolean | NO | Should a message be posted on stream start? | `true` |
| notifyOnEnd | boolean | NO | Should a message be posted on stream end? | `false` |
| messageStart | function | NO | Returns function to be posted on start, gets full channel info as parameter | `We're live playing ${channelInfo.type.game} on Mixer! Join the fun at <https://mixer.com/${channelInfo.token}>!` |
| messageEnd | function | NO | Returns function to be posted on end, gets full channel info as parameter | `Stream is over.`|

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