twitch-sentry

1.4.4 • Public • Published

Build Status npm version npm

TwitchSentry

Twitch bot, running Node.js using RxJS, TypeScript, lowdb and tmi.

  • Betting system.
  • Storing user information in local JSON database.
  • Event Based.
  • Configure custom commands and responses.
  • Configure custom periodic messages.

📖 Wiki

For detailed information on installation and all the available commands go to Wiki

Installation

npm

$ npm install twitch-sentry

Or build it yourself:

$ git clone https://github.com/spnq/twitch-sentry.git
$ cd twitch-sentry
$ npm install

Configure the bot and run

$ npm run build

Configuring the bot

Go to src/config.ts and change it accordingly:

{
    auth: "",
    botName: "",
    channels: [""],
    defaultChannel: ""
}
  • auth - Oauth you got from twitchapps.com/tmi.
  • botName - Bot's nickname from twitch.com.
  • channels - Channels bot connects to.
  • defaultChannel - Value with a channel, bot interacts with

Build the bot with

$ npm run build

Then start Sentry with

npm start

You should see a message from your bot in the chat.

Add custom commands and responses

Go to src/custom_messages.ts and add you own messages:

{
    "!github":"https://github.com/spnq/twitch-sentry",
    "!email":"spnq@riseup.net"
}

Add custom periodic messages

Go to src/periodics.ts and add your messages and intervals for them to appear with in the array, for example:

 [
    {
        message: "Give a Star @https://github.com/spnq/twitch-sentry",
        interval: {
            hours : 0,
            minutes: 0,
            seconds: 10
        }
    }
]

Betting

  • Once you want to start a betting cycle type !startBet in the chat.
  • Then bet with !bet command. Guess value goes first, bet value goes second.
  • When all the bets are placed, stop betting process with !stopBet command.
  • When you got your result type !result and it's value to determine the winners.

License

Licensed under MIT License. View the file for the full text.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.4
    2
    • latest

Version History

Package Sidebar

Install

npm i twitch-sentry

Weekly Downloads

2

Version

1.4.4

License

MIT

Unpacked Size

19 kB

Total Files

17

Last publish

Collaborators

  • spnq