Closed rmblau closed 1 month ago
Create an event handler in your main bot file. something like the following,
from events import onpubmsg
server.add_global_handler("pubmsg", on_pubmsg)
and then in events.py create the on_pubmsg function.
def on_pubmsg(server, event):
"Event fired when client receives a message from a channel"
print(event)
server.privmsg(event.target, " ".join(event.arguments))
While using AioSimpleIRCClient how can I receive public messages in a channel? I do not see any obvious way of doing this. I am using the irccat-aio example as a base. Thanks in advance!