mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-03 20:44:54 +01:00
16 lines
294 B
Python
16 lines
294 B
Python
|
#!/usr/bin/env python3
|
||
|
from pyln.client import Plugin
|
||
|
|
||
|
plugin = Plugin()
|
||
|
|
||
|
|
||
|
@plugin.hook('custommsg')
|
||
|
def on_custommsg(peer_id, message, plugin, **kwargs):
|
||
|
plugin.log("Got a custom message {msg} from peer {peer_id}".format(
|
||
|
msg=message,
|
||
|
peer_id=peer_id
|
||
|
))
|
||
|
|
||
|
|
||
|
plugin.run()
|