PEP8, mkdocs, corrected logo
This commit is contained in:
parent
a75d729e93
commit
9c4274284f
99 changed files with 1625 additions and 39720 deletions
|
@ -16,6 +16,7 @@ if resp:
|
|||
async def console(msg):
|
||||
print('<', msg)
|
||||
|
||||
|
||||
async def main():
|
||||
s.start()
|
||||
await asyncio.gather(
|
||||
|
@ -23,6 +24,7 @@ async def main():
|
|||
commands()
|
||||
)
|
||||
|
||||
|
||||
async def commands():
|
||||
while True:
|
||||
cmd = await aioconsole.ainput('> ')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from getpass import getpass
|
||||
from python_aternos import Client, atserver
|
||||
from python_aternos import Client
|
||||
|
||||
user = input('Username: ')
|
||||
pswd = getpass('Password: ')
|
||||
|
@ -9,7 +9,7 @@ s = aternos.list_servers()[0]
|
|||
files = s.files()
|
||||
|
||||
while True:
|
||||
|
||||
|
||||
cmd = input('> ').strip().lower()
|
||||
|
||||
if cmd == 'help':
|
||||
|
@ -31,7 +31,7 @@ while True:
|
|||
print(path, 'contains:')
|
||||
for file in directory:
|
||||
print('\t' + file.name)
|
||||
|
||||
|
||||
if cmd == 'world':
|
||||
file = files.get_file('/world')
|
||||
with open('world.zip', 'wb') as f:
|
||||
|
|
|
@ -15,15 +15,18 @@ aternos = Client.from_credentials(user, pswd)
|
|||
s = aternos.list_servers()[0]
|
||||
socket = s.wss()
|
||||
|
||||
|
||||
@socket.wssreceiver(atwss.Streams.console, 'Server 1')
|
||||
async def console(msg, args):
|
||||
print(args[0], 'received', msg)
|
||||
|
||||
|
||||
async def main():
|
||||
s.start()
|
||||
await socket.connect()
|
||||
await asyncio.create_task(loop())
|
||||
|
||||
|
||||
async def loop():
|
||||
while True:
|
||||
await asyncio.sleep(1)
|
||||
|
|
|
@ -9,15 +9,18 @@ aternos = Client.from_credentials(user, pswd)
|
|||
s = aternos.list_servers()[0]
|
||||
socket = s.wss()
|
||||
|
||||
|
||||
@socket.wssreceiver(atwss.Streams.console)
|
||||
async def console(msg):
|
||||
print('Received:', msg)
|
||||
|
||||
|
||||
async def main():
|
||||
s.start()
|
||||
await socket.connect()
|
||||
await asyncio.create_task(loop())
|
||||
|
||||
|
||||
async def loop():
|
||||
while True:
|
||||
await asyncio.sleep(1)
|
||||
|
|
Reference in a new issue