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 standardized Abstract Action, Validator, and Handler #59
The base Abstract class for all actions should be
AbstractAction, AbstractMessageAction will extend AbstractAction
The base Abstract class for all validators should be
AbstractValidator, AbstractMessageValidator will extend AbstractValidator
The base Abstract class for all handlers should be
AbstractHandler, AbstractMessageHandler will extend AbstractHandler
This will then allow us to make Generic actions, validators, and handlers that don't rely on a message.
We can also make actions, validators, and handlers for each subscription type
AbstractInterval{Action|Validator|Handler} while still maintaining the Abstract structure.
Abstract{Validator|Action|Handler}.handle should only accept a HandlerAgent
High level Todos
[x] Validators
[x] Create AbstractMessageValidator that is a copy of the existing AbstractValidator
[x] Update AbstractValidator to not require a message in the shouldTrigger and handle functions
[x] Actions
[x] Create new AbstractAction that doesn't require a message in handle, make AbstractMessageAction extend it
[x] Handlers
[x] Create new AbstractHandler where handle doesn't require a message. AbstractMessageHandler should extend it
The base Abstract class for all actions should be
AbstractAction
,AbstractMessageAction
will extend AbstractActionThe base Abstract class for all validators should be
AbstractValidator
,AbstractMessageValidator
will extend AbstractValidatorThe base Abstract class for all handlers should be
AbstractHandler
,AbstractMessageHandler
will extend AbstractHandlerThis will then allow us to make Generic actions, validators, and handlers that don't rely on a message.
We can also make actions, validators, and handlers for each subscription type
AbstractInterval{Action|Validator|Handler}
while still maintaining the Abstract structure.Abstract{Validator|Action|Handler}.handle
should only accept a HandlerAgentHigh level Todos
AbstractMessageValidator
that is a copy of the existingAbstractValidator
AbstractValidator
to not require amessage
in theshouldTrigger
andhandle
functionsAbstractAction
that doesn't require amessage
inhandle
, makeAbstractMessageAction
extend itAbstractHandler
wherehandle
doesn't require a message.AbstractMessageHandler
should extend it