Dynamic Twitch Predictions

Description

With the Dynamic Twitch Predictions extension, you can create, lock, resolve, and cancel Twitch Predictions directly via chat command or Stream Deck buttons (such as with an HTML deck or Stream Deck), all with a single action!

Import Code

dynamicTwitchPrediction_SBv0.2.0.sb (10.1 KB)

Steps after Import

  1. Enable the !prediction command, edit the permissions to your desire (I just set it to allow Moderators).
  2. Link the Prediction Events to their corresponding events under Platforms > Twitch > Predictions. These actions now have triggers associated with them.
  • By linking the prediction events to these actions, you can also cancel/lock/resolve any predictions created outside of the extension via chat commands.

Usage

  • You can edit the defaults within the Prediction Button Create action.
    image1

  • If you want to do via command, you can call !prediction, which will start the prediction with the default arguments
    Optional arguments have to go before the prediction options:

Duration

duration60 or duration 60 (any integer between 30 seconds and 1800 seconds)
e.g. !prediction duration 60 / yes / no

Title

titleThis is a title or title This is a title
e.g. !prediction title What will he rate this? / 1/2/3/4/5/6/7/8/9/10

e.g. with both duration and title
!prediction duration 30 / title Will he stop the boss? / yes / no

Options

Required arguments are your prediction options separated by /
e.g. !prediction Red / Blue / Yellow This will use the default duration and title.

Canceling, locking, and resolving

!prediction cancel will cancel the prediction
!prediction lock will lock the prediction so no one can wager more points
!prediction resolve <option> will resolve the prediction with the supplied <option> as the winner
e.g. !prediction resolve Blue

5 Likes

Updated import code and documentation for Streamer.bot v0.2.0+