|
|
|
@ -37,13 +37,13 @@ class Plugin:
|
|
|
|
|
plugins. It can also save data using the Bot's storage feature to be
|
|
|
|
|
available after a restart.
|
|
|
|
|
|
|
|
|
|
Initalisation should be very fast, no network connections or anything. They
|
|
|
|
|
are initialised before connecting to the server, so their `is_ready` flag
|
|
|
|
|
is set at that point. The loading order is more or less random, so a plugin
|
|
|
|
|
cannot assume another has been loaded during initialisation. If it wants to
|
|
|
|
|
interact with another plugin, the earliest point to do that is in the
|
|
|
|
|
on_welcome callback which is called after connecting to a server, and can
|
|
|
|
|
disable itself by setting its own `is_ready` flag to false.
|
|
|
|
|
Initialisation should be very fast, no network connections or anything.
|
|
|
|
|
They are initialised before connecting to the server, so their `is_ready`
|
|
|
|
|
flag is set at that point. The loading order is more or less random, so a
|
|
|
|
|
plugin cannot assume another has been loaded during initialisation. If it
|
|
|
|
|
wants to interact with another plugin, the earliest point to do that is in
|
|
|
|
|
the on_welcome callback which is called after connecting to a server, and
|
|
|
|
|
can disable itself by setting its own `is_ready` flag to false.
|
|
|
|
|
|
|
|
|
|
A plugin can access its config once the base `__init__` has been called.
|
|
|
|
|
The configuration is valid only is `is_ready` is True, else accessing its
|
|
|
|
|