We are back with another Streamer.bot tutorial! This time we are going to be looking into making a custom hug command for your chat. Building from our previous tutorials, you will be able to make a custom hug command which can be easily adapted for other use.
Hugs for everyone
Step 1: Step up your action and triggers
Set up your command triggers in the action bar using the commands you prefer. We use “!hug” but you can make it your own using any command. At this stage you should already be familiar with Actions and Triggers, but if not you can find our tutorial here.
Step 2: Get info from chat
Sending a hug message requires Streamer.bot to take two pieces of information from the chat, the name of the person triggering the command (the user) and the name of the person targeted in their command (the stream input).
Navigate through the right-click Context Menu to “Get User Info for Target“. We want to create two of these one to get the Source Type “User” and the other to get the “From Input” to get the target user name.


Step 3: Send a message in chat
Now Streamer.bot has the information it needs, it can send a message back to your chat. Here we want to use the code “%user%” to call the user information from the message that triggered the command, and the code “%targetUser%” to get the name of the user targeted in chat.
Navigate the context menu to add a “Send Message to Chat“ Sub-Action and create your hug command using these input codes and you should end up with something like the example below.

Step 4: Add media pop-ups
With your hug command in place, you can also link it up to a media file to make it appear on screen using the “Source Visibility State” Sub-Action. You can find our full tutorial on this here.
Your hug command should now look something like this:

Step 5: Test your command
Your !hug command should now be ready to go. Jump into your chat and give it a try.

Bonus Hints & Tips
This command structure can be applied to a wide variety of commands, so get creative! You can use %user% and %targetUser% to feed the name of your chatters into Streamer.bot for all kinds of commands, hugs are just the beginning!
Variables
You can add logic into your Sub-Actions. For example you may want it to say something different if there is no target user for it to collect, or perhaps you want it to choose from two or more different responses.
We will try and cover these in the future but they can be overwhelming, so only start playing with them once you are comfortable.

Consent
Some people would rather not have hugs, virtual or otherwise. You can manage who is allowed to use this command in the “Commands” tab. Let us know if you would like us to go into more detail about this in the future.
Other uses
Of course you don’t have to give your viewers hugs. You can change this command to suit any need. Popular variations include spank, bonk and cuddle. Either way, use the above steps to gather the information you need and put Streamer.bot to work!
Leave a Reply