Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "core"

This is your entrypoint to the boilerplate-core, check out the Setup Guide to get started

Index

Variables

Const joinChannel

joinChannel: joinChannel = bot.joinChannel

Const leaveChannel

leaveChannel: leaveChannel = bot.leaveChannel

Functions

initialize

  • The heart of this package, read more in the Setup Guide

    example
    const { initialize } = require('twitch-chatbot-boilerplate');
    
    async function main() {
        const { client } = await initialize();
    
        // This is the example on the tmi.js website
        client.on('message', (channel, userstate, message, self) => {
            if (self) return;
            if (message.toLowerCase() === '!hello') {
                client.say(channel, `@${userstate.username}, heya!`);
            }
        });
    }
    main().catch((e) => console.error(e));

    Parameters

    Returns Promise<InitializeObject>

Generated using TypeDoc