Build a Twitch.tv Chat Bot in 10 Minutes with Node.js – Tutorial



Download Node.js – https://nodejs.org/en/
Node.js Tutorial – https://youtu.be/Do_Hsb_Hs3c
Tmi.js Documentation – https://www.tmijs.org/
Generate OAuth Token – http://twitchapps.com/tmi/

Follow me on Twitter for updates! @dev_coffee or https://twitter.com/dev_coffee

source

36 comments

  1. Anybody know how to fix the err:

    var client = new tmi.client(options)
    ^

    TypeError: tmi.client is not a constructor
    at Object.<anonymous> (/Users/WolvenOne/Desktop/TwitchBot/server.js:18:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:393:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:508:3

  2. To start off I am not thte best at this. But I was wondering if there is ever going to be a part 2 with the bot automatically timing people out or banning people. With subscriber messages, cheers messages. With automatic messages and stuff like this. Since this is not my strong suit, I would love to a follow up. Or if anyone is able to help me with writing these commands 🙂

  3. this part of the code doesn't appear on the console……. client.on('connected', function(address, port) {
    console.log("Address: " + address + " Port: " + port);
    }); I'm not sure if it's because of the version of Sublime, but it doesn't appear on the console at all, but the connection works

  4. Maybe this is a stupid question so sorry in advance.

    Once I have this all working. Is it possible to take the app.js and host it on a webserver so that I can have it running at all times and not just from my pc?

  5. +Dev Coffee this is an awesome video thanks for making it! I was wondering if you could take a look at my code and tell me what's going wrong.

    I'm trying to make a bot that auto-bans a certain username whenever they join my channel, however currently it executes whenever anyone joins the channel.

    heres the hastebin link to my code

    http://hastebin.com/xaziteliha.php

  6. if you run into “tmi.client is not a constructor” then you probably installed the wrong package. “npm i tmi.js –save” is how you install

Leave a Reply to Tre Babcock Cancel reply

Your email address will not be published. Required fields are marked *