Skip to main content

A plugin for streamers!! Handles live events and such

Project description

chat triggers

"A mod for twitch streamers. Handles live events with the rules handcrafted by the streamer!"

The full documentation can be found Documentation here

Features

- A lot of events!!

The plugin's able to respond to a wide variety of events! Donations, follows, subscriptions, resubs, bits...

- An easy way to bind to events

Implements workflows, which are an easy way to have commands be ran upon an event.

# The name of the workflow. It can be anything.
name: Give Chalupa7235 Diamonds on Follow

# Events that trigger this workflow
event: 
 # You can have more workflows if you'd like, and 
 # they'd all trigger this workflow.
 - TwitchFollowEvent

# Commands that run before the workflow. If one of
# these commands succeed or fail unexpectedly,
# then it skips over the main steps. Optional.
conditions:
 # You can add more, if you'd like. The format
 # is <command>: <succcess/fail>, wherein `false`
 # means you're expecting it to fail and `true`
 # means you're expecting it to succeed.
 - testfor Chalupa7235: true

# If conditions succeed (or you don't have any),
# then these commands here run.
steps:
 - "give Chalupa7235 diamond 64"
 # ...you can add more if you'd like

# If conditions fail, then the commands here run.
fail_steps:
 - "say Chalupa7235 isn't in the server!"
 # ...you can add more if you'd like

- A plugin API so external plugins can interact.

Other plugins can interact with ChatTriggers, which means you're not limited to workflows.

from endstone_twitch_spawn import (
   get_chat_triggers_api, 
   TwitchFollowEvent, 
   streamlabs_event_handler, 
   ChatTriggersApi
)
from endstone.plugin import Plugin

class ExamplePlugin(Plugin):
   def on_enable(self):
       # This will get the plugin, and then the 
       # plugin's API.
       api: ChatTriggersApi | None = get_chat_triggers_api(self.server.plugin_manager)

       # Since we're doing everything right, there
       # is little-to-no reason that this should 
       # return None.
       assert api, "`get_chat_triggers_api` returned `None`"
       self.api: TwitchSpawnApi = api
       
       # Just like Endstone's register_events, you
       # can make a sperate listener class in a
       # different module to make >everything cleaner.
       self.api.register_events(self)

   @streamlabs_event_handler
   def on_twitch_follow(self, event: TwitchFollowEvent):
       # Simple test log so you can see that the 
       # plugin's API is funcitonal.
       self.logger.info("Somebody followed!!")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

endstone_chat_triggers-1.0.1.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

endstone_chat_triggers-1.0.1-py2.py3-none-any.whl (29.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file endstone_chat_triggers-1.0.1.tar.gz.

File metadata

  • Download URL: endstone_chat_triggers-1.0.1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for endstone_chat_triggers-1.0.1.tar.gz
Algorithm Hash digest
SHA256 72674b2ee68b5fa5355aecbd7126cdfd8953cc65d28a3702f9a6dc764582e26b
MD5 df72ecc79060e070bf3b8f9f75b8b202
BLAKE2b-256 83130320ebd7ced978e774218c996c9f6a611b3899fa65002d2687dee65fefdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for endstone_chat_triggers-1.0.1.tar.gz:

Publisher: python-publish.yml on niko-at-chalupa/endstone-chat-triggers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file endstone_chat_triggers-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for endstone_chat_triggers-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8de43dfcd18663c94961d76781d425fd4bba02166c1b627840c292011e93c427
MD5 0b992999e3b3523815a05bbc7cf813d9
BLAKE2b-256 db3ac1d0e1e3dc95ca0a4a5a668adda3016a33886b1e95e1f0e4bf99fbfa51a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for endstone_chat_triggers-1.0.1-py2.py3-none-any.whl:

Publisher: python-publish.yml on niko-at-chalupa/endstone-chat-triggers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page