Using Twitch API with mIRC?

Trying to make a twitch bot to replace some of the functions that nightbot offers with mIRC so I can give it a custom name, color, and all the other good stuff however I would like to know how I can apply twitch’s API to it so I can use things like
!uptime

Stream has been live for: $(twitch $(channel) "{{uptimeLength}}")

!caster

Check out $(touser) at http://twitch.tv/$(touser)! They were last playing: $(twitch game $(touser))

through my bot.

If anyone could help with this it would be a great help

You can’t use typical IRC commands like /nick or use color codes on TMI. You can make an account for your bot to use, and that’s the name it will have. It can do ‘/me’ aka ACTIONS to make it’s chat color match it’s username color. To make HTTPS API calls and receive the JSON output will take a little bit of work but it is possible. (I do it.)

The general consensus I’ve seen here, is “Don’t use mIRC”

Since the API doesn’t have an uptime length you would have to create a function to do some math, or use someone else’s script to convert it to hours/minutes/seconds.

In mIRC you would make a simple trigger for !caster and then query the API using $1 as the mIRC variable for the word after !caster, so !caster Matt would link Twitch and the same idea for the last game.

For detailed help, message me. I’ll see what I can do!

Well I already have an actual twitch bot account; MinuetteBOT and i’ve been slowly making commands for it however uptime and caster are two things I would need help with

The general consensus I’ve seen here, is “Don’t use mIRC”

Hey Matt can you elaborate on this? What are some of the problems with mirc and what are some better options? Thanks!

Python, Perl, PHP, Java, JavaScript… using various libraries developed for use with Twitch Message Interface.

Java - https://github.com/blay09/JavaTMI
JavaScript - https://github.com/Schmoopiie/tmi.js/
Python - https://libraries.io/pypi/spasm

This was just a quick search but there is lots out there.

mIRC is made for IRC and takes a lot of work to get everything “just right”. TMI is based on IRC, but isn’t IRC. Depending on your scripting/programming skill you might be able to make mIRC do everything you want, even the complex things. At that point it’s pretty much about efficiency and speed. Stacking more and more to get it to be where you need it to be to work.

I’m sure more people can elaborate on this and some people will say it works fine…
…and I’m sure it will work fine for some things… lots of things…
It’s just not the best way, not the cleanest way, not the most efficient way.

@matt_thomas Yeah I switched to Node.JS with TMI after a while and learned it’s SOOOOO much easier than mIRC once you understand the language and how to do things; Within a week i even learned how to import seperate files to call variables from such as using commands not listed in the main file.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.