TriggerBucket.__init__#

TriggerBucket.__init__(triggers=None, condition='any', max_triggers=1000000000)[source]

Initialize the trigger.

Parameters:
  • triggers (Trigger | list[Trigger] | None) – A single trigger or a list of triggers that can activate the event. Defaults to None.

  • condition (str) – The condition for the triggers to fire the event. If “any”, the event fires if any trigger is active. If “all”, the event fires only if all triggers are active. Defaults to “any”.

  • max_triggers (int | None) – The maximum number of times the trigger can be called. Defaults to no limit.