Skip to content

v3.401 Events & stuff

Compare
Choose a tag to compare
@BOLL7708 BOLL7708 released this 02 Jul 09:41
· 599 commits to master since this release

First release! Why 3.x? It just felt right. I think there's been at least two major rewrites/transitions so at least a major version of 3 seemed like a good idea. The other number is just the amount of commits on the project, I'm lazy like that.

I will plug in what I posted on Discord here, because my memory is failing me, which is why I need these release notes myself. As a form of documentation of what has changed, and when. The idea is that if you are behind on the releases, these update notes will be individual update steps to reach the latest release. So, if there are major restructuring going on, it will be descried here.

In this case, there has been another shift of where things are. Not as bad as when actions move into the rewards, that was a mess, but still some amount of reshuffling.

To generalize Actions even more, they are now inside of Events, and these have Triggers that represent all the ways they can be activated. This means anything you set up for a reward or chat command can be reused for the other, with ease. You can even have an event that is triggered by either at the same time, so flexible! This means it is also quite straight forward to migrate from non-affiliate on Twitch using commands, to affiliate using rewards.

Config Changes

What we are practically doing is to move actions from the Reward configs to actions in the new Event configs.
Then we take the Reward config itself and put that inside triggers in the Event configs. A bit of a juggle, and as a reference of how things should look, you can check out these new template files:

  • config+commands.template.ts
  • config+rewards-template.ts

You can with benefit copy in the commands and rewards templates above, because all default commands rewards now rely on these events that we will create, so all previously existing ones have been moved into these template files. What has changed is that they now reference additional callbacks specific for their Keys, so as long as the command or reward uses a specific key, they will also use the additional functionality.

These config locations for Reward configs have been removed, you should move the contents of these into the events in the next section.

Config.twitch.commandConfigs
Config.twitch.defaultRewardConfigs
Config.twitch.rewardConfigs
Config.twitch.gameRewardDefaultConfigs
Config.twitch.gameRewardConfigs

These are the two new pools that will contain all reward and chat command configs from now on. As you can see these are not grouped under Twitch like the old reward pools, but wholly separate event pools, as they can in theory be triggered by things not related to Twitch.

Config.events
Config.eventsForGames

An event looks like this, and contains what was in the previous reward pools, plus options that will support future developments.

{
    options: { ... },
    triggers: {
        command: { ... },
        reward: { ... }
    },
    actions: { ... }
}

To see how to actually populate these, or to extend things, check the new config template files referenced at the top of this section.

New Features

Does this section go here? Or before config changes? Who knows, this is how it is this time anyway.

Raiding

There are now raid commands! They are part of the commands config template, but in short you can initiate a raid if you run !raid tag|name|link, or !unraid to cancel a raid. For this to work you need to regenerate your channel token with this additional scope: channel:manage:raids

Command Variations

For keys used for commands, you can now provide alternatives, so instead of just say as value, you can do say|talk|speak and any of those will trigger the provided actions now.

Text Tags

The tag replacement system has been expanded a lot, check the wiki page for Text Tags to see all the current options.

Game

With the above mentioned tag updates, the !game command is now possible to build entirely with the tag replacement feature. The default hard-coded command has as such been moved into the commands config template.

Cheer Trigger

It is now possible to trigger events on someone cheering a specific amount of bits in the channel. Set a cheer trigger for an event.

Say

Just like with the game reward, the !say command can now easily be done with the text tags, so it has been moved to a custom command and is also available in the commands config template.

TTS Set Voice

This reward is now more lenient when matching language or country for a TTS voice, it will do a best guess match and use that to select a voice, so you an input like kr should give you Korean, and sv should give you Swedish. There has been plans to transition TTS settings to an action, so it can also be used with commands, but that work has been delayed but the heat wave we've had. Brain no werx.