mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-13 12:46:53 +00:00
Added contact based dest
This commit is contained in:
@@ -17,6 +17,10 @@ async def main () :
|
||||
await mc.connect()
|
||||
|
||||
await mc.ensure_contacts()
|
||||
await mc.commands.send_msg(bytes.fromhex(mc.get_contact_by_name(DEST)["public_key"])[0:6],MSG)
|
||||
contact = mc.get_contact_by_name(DEST)
|
||||
if contact is None:
|
||||
print(f"Contact '{DEST}' not found in contacts.")
|
||||
return
|
||||
await mc.commands.send_msg(contact ,MSG)
|
||||
|
||||
asyncio.run(main())
|
||||
|
||||
Reference in New Issue
Block a user