mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
set_name and advert
This commit is contained in:
parent
c5d665b916
commit
0128e7ebd5
1 changed files with 10 additions and 7 deletions
17
mc-cli.py
17
mc-cli.py
|
|
@ -175,19 +175,22 @@ async def main(args):
|
|||
return
|
||||
|
||||
match args[1] :
|
||||
case "test" :
|
||||
case "test" :
|
||||
await test(mc)
|
||||
case "send" : # sends from pubkey ... does not work for the moment
|
||||
case "send" : # sends from pubkey ... does not work for the moment
|
||||
print(await mc.send_msg(args[2].encode(), args[3]))
|
||||
case "sendto" : # sends to a name (need to get contacts first so can take time, contacts should be cached to file ...)
|
||||
case "sendto" : # sends to a name (need to get contacts first so can take time, contacts should be cached to file ...)
|
||||
await mc.get_contacts()
|
||||
print(await mc.send_msg(mc.contacts[args[2]]["public_key"][0:6], args[3]))
|
||||
case "contacts" :
|
||||
case "contacts" :
|
||||
print(await mc.get_contacts())
|
||||
case "recv" :
|
||||
case "recv" :
|
||||
print(await mc.get_msg())
|
||||
case "infos" :
|
||||
case "infos" :
|
||||
print(mc.self_info)
|
||||
|
||||
case "advert" :
|
||||
print(await mc.send_advert())
|
||||
case "set_name" :
|
||||
print(await mc.set_name(args[2]))
|
||||
|
||||
asyncio.run(main(sys.argv))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue