Base#

class clicky.backends.base.Backend(app: Clicky, name: str, backend: BackendConfig)#

A Backend implements the 3rd-party side of Clicky. These can be bots for Slack or Discord, or local options like a GUI wizard or CLI wizard like Trogon.

is_allowed(command: str, identifiers: list[Identity]) bool#

Given a command and a list of 0 or more clicky.types.Identity objects, check to see if at least 1 of the passed identities is allowed to run this command.

Returns:

True if the command is allowed, otherwise False.

async on_command(command: str, identifiers: list[Identity], context: MessageContext)#

Called when there’s a command to run.

Performs a permission check before forwarding the command to the frontend (such as click) that is responsible for actually running it.

abstract async run()#

Take over the process and start the bot. This will be called only after forking the process, so you can do whatever you want here.