This node bot allows to post mixer.com status updates to a discord channel using webhooks.
To install the latest version
yarn add mixerstatus-discordbot
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();
The bot has two parameter objects, config (required) and options (optional)
Key | Value | Required |
---|---|---|
channelId | Mixer Channel ID | YES |
webhook | Discord Webhook URL | YES |
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. |