GithubHelp home page GithubHelp logo

twitch-bot's Introduction

Twitch Bot

A twitch chat bot for funzies.

Install

npm install

Getting Started

Local instance

npm run start

Overlay Widgets

Alert Widget localhost:4000/alert

HackBar Widget localhost:4000/hack-bar

Get OAUTH_TOKEN

an easy way to get the OAUTH_TOKEN from a community driven api wrapper

more info on it https://dev.twitch.tv/docs/authentication/#registration

curl -H "Authorization: Bearer <access token>" https://api.twitch.tv/helix/

Vox Dependencies

To get !vox to work install espeak-ng sudo apt install espeak-ng !Vox uses node child process spawn to run command espeak-ng <message>

DEPRECATED say.speak LINUX

To get this working

sudo apt-get install festival festvox-kallpc16k

Source: https://github.com/marak/say.js/

funny_texttospeak_lines

Contributing

see CONTRIBUTIN.md

Adding !Commands

How to add Sound Commands

  1. Adds sound mp3 to assts/sounds
  2. Add gif animation to assets/gif
  3. in src/overlay/commands.ts add imports to bots gif and mp3 on a new lines together
  4. Create a new key object on the commands object example
...
import hackerGif from '../../assets/gif/this-is-fine.gif'
import hackerSound from '../../assets/sounds/re-sucks.mp3'

export const commands = {
  ...
  hack: {
    gif: hackerGif,
    sound: hackerSound,
    duration: 3000 // time that gif is displayed in ms
  }
}

How to add other types of commands

  1. Edit src/bot/commands.ts or src/bot/keywords.ts the commands.ts is for regular !commands keywords are any words in chat that you want the bot to respond to
  2. append the command or keyword object with a new object like so
export const commands = {
  ...
  hack: {
    text: 'bot will type this in chat'
    // you can also have an array of strings to randomly choose from
    text: ['bot will type this', 'or maybe this']
  }
}

or

export const commands = {
  ...
  hack: {
    say: 'bot will say this using vox'
  }
}

or both is acceptable. The bot will do both.

export const commands = {
  ...
  hack: {
    text: 'bot will type this in chat',
    say: 'bot will say this using vox'
  }
}

note sound/gif commands and text/say/keyword commands can share same command and should run at the same time.

twitch-bot's People

Contributors

patomation avatar enjoy2live avatar rugglcon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.