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

Download Node.js –
Node.js Tutorial –
Tmi.js Documentation –
Generate OAuth Token –

Follow me on Twitter for updates! @dev_coffee or



  • NightBorn 5 years ago

    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

  • bentozaful 5 years ago

    I cant get past
    i have the exact same code in my app.js file (with my personal api-key and username) and i get the error:
    "error: Improperly formatted auth" 🙁

  • BaHeTo0 5 years ago

    how can i get the time since i went live until the point i write a command? I want to make that !uptime command that shows it.

  • Andrea Biaggi 5 years ago

    Is there a version of TMI but for Java?

  • Juan Jimenez 5 years ago

    This is awesome! thank you ! haha straight outta cookies 😀

  • Chaaos2 5 years ago

    Great video mang.. exactly what i was looking for when i googled "build a twitch bot with javascript"

  • AvatarLand Razer 5 years ago

    updated versions with more advanced stuff? like ban commands, points, etc?

  • Colinsnoey7 5 years ago

    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 🙂

  • Diana Carrier 5 years ago

    Awesome tutorial! Also your keyboard sounds amazing and I want it!

  • Pete Robie 5 years ago

    Any plans on a follow up to this? Maybe hooking it up to mLab instead of hard coding everything. Good work.

  • Andrew Snider 5 years ago

    keeps on coming back with tmi.client is not a constructor. any ideas on how to fix that?

  • Jackson Stone 5 years ago

    I have that same straight outta cookies shirt

  • juicemna1 5 years ago

    this is a great tutorial btw!

  • juicemna1 5 years ago

    can you show a vid on how to make HTTP 'POST' from twitch api

  • Klatuu82 5 years ago

    Hi, nice Vid, this get me started with node.js

    Now my Q: how to run in on server, can anyone show me this.

  • youreMine - Hendrik 5 years ago

    Text Editor Name?

  • juicemna1 5 years ago

    how you make the console.log code part appear in the command prompt? It's not appearing for me

  • Diego Ochoa Maldonado 5 years ago

    thanks for the video bro. helped a lot

  • juicemna1 5 years ago

    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

  • juicemna1 5 years ago

    I'm confused as to how he ran the code. Where do you find that thing at the bottom right of the video? How do you get to it?

  • Semagdad 5 years ago

    Your awesome man

  • An Idiot's Guide 5 years ago

    For some reason I'm getting "tmi.client is not a constructor" error when trying to make the client.

  • Shubham Jain 5 years ago

    Dude this video is so awesome just like your other videos. Please keep adding some more stuff. Cheers!

  • Tre Babcock 5 years ago

    Thanks man. Gave me all the information I needed to get started.

  • Luculent - 5 years ago

    Thanks this has really helped me get started. If you make another one a simple loyalty system demo would be a nice touch

  • Wiktor Zralka 5 years ago

    When will you make another video about twitch bot?

  • Jed Padilla 5 years ago

    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?

  • Supermansbrother 5 years ago

    +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

  • foetee 5 years ago

    You are awesome at explaining things. Good work man.

  • Christopher Atwater 5 years ago

    this is a great tutorial! please add coding support for manipulating stream currency through secondary bots like ankhbot.

  • Yoshii 5 years ago

    If you want to do simple testing and are currently offline, you could always do this to go to just your Twitch chat without actually loading your channel: USERNAME HERE/chat

  • TE4L 5 years ago

    Why is js way faster at connection to an IRC than PHP?

  • Chris Gates 5 years ago

    will the generated oauth token expire?

  • AidanOleary92 5 years ago

    Awesome video

  • DICE HELIX 5 years ago

    helix_on_twitch Hook me up when im online, too much tech for me. good job kboqing it though

  • qwe 4 years ago

    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


Add your comment

Your email address will not be published.