-
Notifications
You must be signed in to change notification settings - Fork 0
Phenny Compatibility
Willie is, by and large, compatible with Phenny and Jenni. It is a goal of the project that modules written for those bots will work with Willie, with a minimal amount of effort.
Note that the arguments to Willie callables are conventionally referred to as bot
and trigger
. These are functionally the same as the phenny
and input
passed to phenny callables, and either naming convention will work.
Prior to the release of Willie v4.1.0, the following compatibility issues were known:
These are likely to affect many or all modules and deployments.
- Willie uses unicode more frequently and consistently than Phenny.
trigger
objects entering your callables will be unicode, and messages sent withwrite
,say
,msg
, etc. must also be unicode objects. - Configuration files are incompatible. A tool exists to assist in converting them to Willie's newer, more versatile format.
- Imports of
web
andtools
must be changed towillie.web
andwillie.tools
respectively (orfrom willie import web, tools
).
These only affect a small number of modules, and/or will fail gracefully
- Phenny's
last_seen_uri
andseen
are replaced by Willie's memory system. Modules using them will likely still work, but may not interoperate with newer modules as expected. -
phenny.stats
will be an empty dict, which will negatively impact any module which uses it. This is likely limited to the.stats
command in Phenny'sinfo
module. - Imports of
icao
are broken, asicao.py
is not included in Willie. This likely only breaks phenny's weather module, the functionality of which is replaced and improved in Willie. - Imports of
bot
andirc
are broken. There is not necessarily a simple solution, but the only module this is likely to affect isreload
, the functionality of which is replaced and improved in Willie. - Callables that used the deprecated function signature from phenny (e.g.
def f_time(self, origin, match, args):
rather thandef f_time(phenny, input):
) are not supported. This will not affect the vast majority of modules. Those that are affected can likely be made to work (though not necessarily meet current style guidelines) by removing theorigin
,match
, andargs
arguments, adding atrigger
argument, and making the following replacements:
Replace this: | With this: |
---|---|
origin |
trigger |
match |
trigger.match |
args[0] |
trigger.bytes |
args[1] |
trigger.sender |
There may be other issues, but they are not known at this time.
TODO: The following members of the Jenni
class are used in jenni, and may or may not be present or have analogs in Willie. More research is needed:
rfn, rdb, reminders, bot, doc, data, variables, notice