Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Can i make my bot join other twitch channels with a command with TMI?
require('dotenv').config(); 

var config = require('./config');

const tmi = require('tmi.js');

const client = new tmi.Client({
    options: { debug: true },
    identity: {
    username: process.env.BOT_USERNAME,
    password: process.env.OAUTH_TOKEN
    },
    channels: [ config.channel ]
});

client.connect();

client.on('connected', (address, port, channel ) =>{
    client.action(config.channel, config.connectedmessage)
});

client.on('chat', (channel, user, message, self) => {
    if (message ==='!join'){
        client.action(config.channel, `${user['display-name']} ${config.joinmessage}`);

        let newchannel = user['display-name'].toLowerCase()
        console.log(newchannel)
    };
});

So i was thinking i would get the new channel name where to connect the bot by making people type !join in the main channel . So i would get their twitch name channel with this function, but i wonder if anyone knows what i can do there to make my bot connect to that channel

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!