Added additional typing and typing fixes

This commit is contained in:
Alex Wolden 2025-04-13 22:37:00 -07:00
parent a1fb931200
commit 84de232f4b
3 changed files with 51 additions and 37 deletions

View file

@ -15,6 +15,6 @@ async def main () :
mc = MeshCore(con)
await mc.connect()
await mc.send_chan_msg(0, MSG)
await mc.commands.send_chan_msg(0, MSG)
asyncio.run(main())

View file

@ -14,7 +14,11 @@ async def main () :
mc = MeshCore(con)
await mc.connect()
await mc.get_contacts()
await mc.commands.send_msg(bytes.fromhex(mc.contacts[DEST]["public_key"])[0:6],MSG)
await mc.ensure_contacts()
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())