1.0.0 • Published 6 years ago

mixerstatus-discordbot v1.0.0

Weekly downloads
4
License
-
Repository
-
Last release
6 years ago

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

yarn add mixerstatus-discordbot

2. Usage

Import the class and configure

    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

KeyValueRequired
channelIdMixer Channel IDYES
webhookDiscord Webhook URLYES

Options

KeyValueRequiredDescriptionDefault
notifyOnStartbooleanNOShould a message be posted on stream start?true
notifyOnEndbooleanNOShould a message be posted on stream end?false
messageStartfunctionNOReturns function to be posted on start, gets full channel info as parameterWe're live playing ${channelInfo.type.game} on Mixer! Join the fun at <https://mixer.com/${channelInfo.token}>!
messageEndfunctionNOReturns function to be posted on end, gets full channel info as parameterStream is over.