Skip to content

"Ready to go" boilerplate with Jest, TMI.js, Nodemon, Config, Babel

Notifications You must be signed in to change notification settings

qWici/twitch-bot-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitch Bot boilerplate

"Ready to go" boilerplate with Jest, TMI.js, Nodemon, Config, Babel.

Install

  1. Clone repository

  2. Install modules npm i or yarn install

  3. Copy example config

    cp config/default.example.json5 config/default.json5
  4. Setup bot

oauth_token you can get here by login via bot

bot: {
    username: "your-bots-username-here",
    oauth_token: "oauthtokenhere"
},
channel: "your-channel-here"
  1. Run bot npm start

Utils

Check if user moderator

import { isModerator } from "./utils";

// You can get info about user from incoming message
const user = messageInfo.user;

if (isModerator(user)) {
  console.log(`${user.username} is moderate this channel`);
}

Send message to user

import { messageToUser } from "./utils";

// You can get info about user from incoming message
const user = messageInfo.user;

const message = ", thanks for follow dude";

messageToUser(user.username, message);

// In chat:
// your_bot: @devkucher, thanks for follow dude

Contributing

If you have any comments or ideas - goto new issue.

Get in touch

Have a fun 😊

About

"Ready to go" boilerplate with Jest, TMI.js, Nodemon, Config, Babel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published