In Part 4 we showed how to debug your script by adding logging. In this part we’ll go through some nice-to-haves: some additions that are not required for a script, but are nice features to have for convenience. We’ll go through adding a cooldown and also adding a UI for your script. Enough chatter, let’s get going!
You might not want your commands to be available to everyone all the time, even though they’re awesome. You could have a busy chat or someone could be a troll and spam the command all the time.
That’s where cooldowns come in. SC has a few handles to add and check for cooldowns on a user or a command. I’m going to show the user-specific cooldown here. It involves two small…
In Part 3 we finished the logic in our Mulder command and it worked beautifully. However, when it comes to programming, there seems to be this unwritten rule: Programs never work first try. It’s always an iterative process, whether it’s changes in how you expect something to work or weird bugs in your code. In this part we’ll focus on the latter. Knowing some debugging skills will really help when making your own commands, or just when programming in general. Let’s get to it!
Logging is basically all I need to show you. Logging what your script is doing and when it’s doing it is the fastest way to find out where a bug could be hiding. Luckily, SC has a log method of its own:
In Part 2 we set up our basic structure and now we are ready to get to the juicy bit, where the script will come to life, so what are we waiting for?
Our command logic goes in the
Execute(data) method, which gets called by SC when a message is posted in the chat. There are some gotcha’s to consider but I’ll guide you through them.
Remember how I said that any command (or message, for that matter) in the chat will trigger our
As we only want to respond to the command !mulder, we should verify that the first thing in the message actually says that. We use the
data parameter that is passed for this, as it contains some properties and methods we can leverage. …
Alright, in Part 1 we installed everything we needed and determined what we are going to build. In this part we’ll build the basic structure that is the same for all scripts. Let’s get cracking!
All Streamlabs Chatbot (SC) commands have some basics you need to have implemented correctly for it to even appear as a runnable script in their UI, let alone run it. These are:
For the Python script to be picked up as a script for SC, the format should be
So, let’s start by creating a
mulder directory and within that directory, create
Yes, I have written a full walkthrough before on how to create command scripts for Twitch, but that had too much backstory and unnecessary additions. Also it’s way too long and intimidating for people just starting out I found out recently through a cool dude that contacted me: SyferCon. So I’m going to cut it up into bite size pieces with more focus, so more people can enjoy making their own commands. Let’s get to it!
To be able to follow along, there are a few things you’ll need:
I do a lot of Twitch related projects here and there, trying to see what the possibilities are. One of my latest projects involved creating a Twitch Emote Extension for Chrome where I showed how to get extra emote “slots” for free. That got me into browser extensions, so I figured let’s show how to make one from scratch by building a profanity filter for the Twitch chat.
At the end of this, we want to have an extension that, when installed, checks for a set of flagged words in chat and replaces them with more friendly versions. …
Some people, like me, prefer working with Git using SSH rather than HTTP(S), where you have to enter your Git credentials, which you may have forgotten or it could just be a secure monster of a password that’s not type-friendly.
Whatever the reason, if you’re just starting out in the wonderful world of source control, GitHub or both and want to start using SSH immediately, it can be quite confusing how to go about it. So this is my attempt at making it easy to follow and understand; let’s get to it!
It’s much simpler than it sounds. Pull up a Command Prompt (on Windows) or a Terminal (on Linux/MacOS) at the home folder, which should be it’s default location anyway. Once there, type the following command and hit Enter/Return (you might need to put sudo in front of it on…
By making your very own browser extension!
Yes, it’s possible. Over time I have heard streamers (mostly up and coming ones) complain about the restrictions Twitch has on opening up more emote slots. You first need to become Affiliate and get more subscribers before getting more emote slots. Even Better Twitch TV has a 30 emote slot limit (15 personal/15 shared) before having to subscribe.
But fear not, my friends, for I come bearing gifts. In this post I will show you how you can get all of your emotes available on Twitch through your own Chrome extension. It’s not going to be as hard as it may sound. …
Yes, I know. I, too, prefer a certificate signed by a known, publicly accessible Certificate Authority (CA). Sometimes, however, a self-signed certificate has its benefits. Testing locally, when you are running in a contained network, using a self-signed certificate might be the only way for you to test encrypted calls over TLS. Or you might be setting up a small local network of your own, with your own server(s), device(s) and access point(s), that has to run without any access to the internet. A closed off network that still needs encrypted traffic between the devices, which was the case for a problem I had to solve at my job. Looking for a way to do it online yielded some parts of the puzzle, but not all of them combined in one tutorial, beginning to end. …
I hear you thinking: “Building an IPA without a Mac? Folly!”. I, too, was under the impression that you had to spend money for access to a system with MacOS (a MacBook, an iMac or even renting online). Over the past week, however, I have found all the pieces of the puzzle to get you an IPA using a Windows PC.
IMPORTANT: I would not recommend this flow for an app in active development. Testing an app on a physical device using this method is very cumbersome and frustrating, especially when you wish to debug specific scenarios. Use this method if you have an app that is (almost) ready for release, if you just wish to try it or if you have no other way of building an IPA. If you are able to get hold of a system running MacOS within your reason and means, I would strongly advise you to go that route. …