Skip to content

whitepapercg/schooldefender

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published