add prints to examples/simple.py

This commit is contained in:
jesopo 2020-04-01 23:06:08 +01:00
parent 81148924b9
commit fb892c584e
1 changed files with 4 additions and 0 deletions

View File

@ -12,10 +12,14 @@ SERVERS = [
class Bot(BaseBot):
async def line_read(self, server: Server, line: Line):
print(f"{server.name}< {line.format()}")
if line.command == "001":
print(f"connected to {server.isupport.network}")
await server.send(build("JOIN", ["#testchannel"]))
async def line_send(self, server: Server, line: Line):
print(f"{server.name}> {line.format()}")
async def main():
bot = Bot()
for name, host in SERVERS: