]> jfr.im git - erebus.git/commitdiff
add `bot.reply` function and hook return shortcut
authorzonidjan <redacted>
Sun, 12 Aug 2018 09:31:05 +0000 (04:31 -0500)
committerzonidjan <redacted>
Sun, 12 Aug 2018 09:31:05 +0000 (04:31 -0500)
bot.reply(chan, user, reply_msg) will now send a reply.
This is meant to be used directly with the chan and user objects passed to a hook.
This is bot.msg(user, reply_msg) when chan is None (i.e. when used via PM or when wantchan=False);
or bot.msg(chan, "user: reply_msg") when chan is not None (i.e. when used in channel or via PM with wantchan=True and channel provided)

Returning a string (Py2: str or unicode) from a hook will now result in a bot.reply.


No differences found