Closed LeoAlt8 closed 1 year ago
You are missing two important points here:
sublevel
, but subLevel
, with capital L.!sublvl
multiple times, i. e. you overwrite the former definition with each new instance of !sublvl
. That’s why you only get the last reaction in your commands list called !sublvl
. There is a link to a documentation about dictionaries in Python in the REAME file in section 3, second paragraph.What you want to achieve isn’t a command the execution of which is restricted to a subscription level, but an answer that depends on the subscription level and differs accordingly. This can’t be done with Willowbot’s default design, but it can indeed be realized by writing a custom module as described in section 4 of the README. You write a module with the name, say, subLevelMsg
and a function subLevelMsg_eval()
within this module, where you do the actual differentiation, and link the !sublvl
command to this function by setting the function
key accordingly.
Regards, Weidengeist
A sub with 2 months writes the command !sublvl, but the bot writes $senderDisplayName text5 to the chat. But this is the answer for 5 months of sub. I left 1, 2 and 3 months, the bot began to answer $senderDisplayName text3. Tried various options. It turned out that the bot always sends text from the last command !sublvl, ignoring "sublevel" : xx