sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
949 stars 403 forks source link

More `commands_on_connect` placeholders #2486

Open dgw opened 1 year ago

dgw commented 1 year ago

Requested Feature

In the vein of #2325, values other than $nickname could be useful in commands_on_connect.

Theoretically, we could support interpolating any value from the bot's settings using dotted notation.

Problems Solved

No response

Alternatives

Bot owner hard-coding the values in two places (both where the setting is defined and in commands_on_connect).

Notes

Biggest implementation question is what syntax to use. Python format-string (''.format(), not f-string) is probably the most familiar to bot owners who choose Sopel because it's written in Python and they can create custom plugins using Python, but there are other templating syntaxes out there.

Using the existing $variable syntax is also an option, so long as we support escaping (\$?).