(custommsg, **_)
| 10 | |
| 11 | @plugin.subscribe("custommsg") |
| 12 | def on_custommsg(custommsg, **_): |
| 13 | plugin.log(f"Received a custommsg with data msg={custommsg}") |
| 14 | |
| 15 | peer_id = custommsg["peer_id"] |
| 16 | payload = custommsg["payload"] |
| 17 | plugin.log(f"peer_id={peer_id}") |
| 18 | plugin.log(f"payload={payload}") |
| 19 | |
| 20 | |
| 21 | plugin.run() |