Livecoding.tv Chat Bot Guide

Chat Bot Guide: This will walk you through the process of setting up your Livecoding.tv chat bot. Follow these steps to install and configure the chat bot to your PC.

How to set up your Livecoding.tv Chat Bot

Install Node.js

Visit Node.js official website. It will automatically detect your Operating System and display a download link. For example, it will display the following download link for 64 bit Windows OS.

Node.js for Chat Bot

Download node MSI for windows by clicking on download for windows link.

The recommended version is v4.3.2 LTS. After downloading the MSI, the installation window will appear as shown below.

NodeJs installation window

Node.js Setup

Once the installation has finished, verify it by typing node-v in the command prompt.

Command Prompt

command prompt

To proceed installing, the bot will fork the repository on Github.

github

Clone the repository

Use the Github Desktop App. Register an account if you don’t have one and install Github Desktop App.

Register on Github here

  • On the top left corner of the app, click + as shown below.

register at github

  • Select livecoding.tv bot

livecoding.tv

  • Click  on to clone it.

click to clone

  • Choose directory and click Ok.
  • Navigate to the livecoding.tv bot directory. Open the setup folder and create a custom folder within the setup folder.

Find your XMPP password on LCTV page

Follow these steps.

  • Open Dev Tools (Ctrl+Shift+I) and switch to the Elements Tab.
  • Search the HTML content (Ctrl+F) for “password“.
  • The XMPP password is a long string in the object containing ‘jid‘ and ‘password‘.

XMPP Password

xmpp password

  • Create credentials.js file in the custom folder.
  • Open Notepad and paste the following:

var username = ‘LCTV_BOT_USERNAME’; // Your Livecoding.tv username
var password = ‘XMPP_BOT_PASSWORD’; // Found in step 3
var room = ‘LCTV_USER_WHERE_BOT_WILL_BE’; // Room username

module.exports = {
   room: username,
   username: username,
   jid: username + ‘@livecoding.tv’,
   password: password,
   roomJid: room + ‘@chat.livecoding.tv’
};

  • Click File>Save as, ‘credentials.js’, Save as type All Files, click Save.
  • Create settings.json file in the custom folder.
  • Open Notepad and paste the following:

{
   “plugins”: {
       “notifications”: true,
       “api-triggers”: true
   }
}

  • Click File>Save as, ‘settings.json’, Save as type All Files, click Save.
  • Navigate to the directory you’ve cloned the bot. Hold Ctrl+Shift and right click on the folder. Click Open command window here.
  • Run: npm install  and wait for the installation to complete, then run  node index.js.

You will be prompted by firewall to allow network access.

  • Click on the Public Network checkbox and select allow.

At this point the bot is ready for your commands. You can enter the following commands in the chat window.

!say [type message] Verbally speaks a message.

!status Returns the user status.

!subject [type subject] Sets the room‘s subject to {subject}.

!todo List the current TODOs.

!top [input number] Displays the top {number} viewers.

!voices Lists the available voices to be used with the !say command.

Avatar
About author

I, Dr. Michael J. Garbade is the co-founder of the Education Ecosystem (aka LiveEdu), ex-Amazon, GE, Rebate Networks, Y-combinator. Python, Django, and DevOps Engineer. Serial Entrepreneur. Experienced in raising venture funding. I speak English and German as mother tongues. I have a Masters in Business Administration and Physics, and a Ph.D. in Venture Capital Financing. Currently, I am the Project Lead on the community project -Nationalcoronalvirus Hotline I write subject matter expert technical and business articles in leading blogs like Opensource.com, Dzone.com, Cybrary, Businessinsider, Entrepreneur.com, TechinAsia, Coindesk, and Cointelegraph. I am a frequent speaker and panelist at tech and blockchain conferences around the globe. I serve as a start-up mentor at Axel Springer Accelerator, NY Edtech Accelerator, Seedstars, and Learnlaunch Accelerator. I love hackathons and often serve as a technical judge on hackathon panels.