juni-b-queer / bsky-event-handlers

Typescript based framework for building Bluesky bots. Designed to be easily extendable, this bot framework can be used to make almost any bot you could want.
20 stars 0 forks source link

Create IntervalSubscription #55

Open juni-b-queer opened 4 months ago

juni-b-queer commented 4 months ago

Relates to #47

Adds a new Subscription class "IntervalSubscription" that takes in Handlers, an agent, as well as a time interval (could use 10s 1m kind of format, or I just do seconds 🤷‍♀️)

Sets up a clock/timer/interval and runs the given handlers at that interval. Maybe the handler includes the interval so the subscription can set multiple different ones for each handler. Or, the options include intervals as an options object.