|  Developer
Updated on May 17, 2022

subscribe(script_name[, events_filter])

  • Subscribe a script for Core events, optionally specifying event filter rules. After subscribing the script will be launched for events happen on a Core and information about this event will be passed as a parameter.
Edit
Edit
fields type description
script string The path to handle script. Example: . The broadcast information comes to this script as argument.
events_filter table Events filter rules.
Edit
subscriber_id (string)
Edit
				
					local core = require "core"

core.subscribe( "HUB:scripts/handle_broadcasts" )