johnmaguire / Cardinal

A Python IRC bot, designed to make adding functionality quick and simple. (est. 2013)
MIT License
100 stars 38 forks source link

Replace setup function with entrypoint #186

Closed johnmaguire closed 3 years ago

johnmaguire commented 3 years ago

Currently, plugins are required to instantiate like this:

def setup(cardinal, config):
    return MyPlugin(cardinal, config)

Instead, we could simply do this:

entrypoint = MyPlugin

The order of cardinal and config also should not matter - and it should be possible to request config without requesting cardinal.