hook.autorespond¶
- class immp.hook.autorespond.AutoRespondHook(name, config, host)¶
Bases:
Hook
Basic text responses for given trigger words and phrases.
- async on_receive(sent, source, primary)¶
Handle an incoming message received by any plug.
- Parameters:
sent (.SentMessage) – Raw message received from another plug.
source (.Message) – Original message data used to generate the raw message, if sent via the plug (e.g. from another hook), equivalent to
msg
if the source is otherwise unknown.primary (bool) –
False
for supplementary messages if the source message required multiple raw messages in order to represent it (e.g. messages with multiple attachments where the underlying network doesn’t support it), otherwiseTrue
.