Commit 86ea0722 authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

added logging

parent 32f231c4
......@@ -5,6 +5,7 @@ import pprint
import requests
import platform
import random
import datetime
from discord.ext import tasks, commands
from discord.ext.commands import Bot
......@@ -26,11 +27,13 @@ currentGames={}
def parse_server_poll(data):
global lastData
global lastData, fout
if data != lastData:
lastData = data
with open('all.log', 'a') as f:
f.write(f"[{str('.')[0]}] {data}\n")
m = reSummary.match(data)
(listing, summary) = (m.groups()[0], m.groups()[1:])
......@@ -162,6 +165,8 @@ async def status_task():
for line in out:
with open('all.log', 'a') as f:
f.write(f"[{str('.')[0]}] > {pprint.pformat(line)}\n")
await ch.send(line)
if len(games) == 0:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment