Commit 07c4d224 authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

tweaks

parent d5f5f8d6
......@@ -85,7 +85,7 @@ async def on_ready():
ch = discord.utils.get(channels, name="find-a-game")
status_task.start()
@tasks.loop(seconds=15.0)
@tasks.loop(seconds=5.0)
async def status_task():
global games, cnt, currentGames, recentlySaid
data = requests.get("https://www.managames.com/tennis/online/TE4_ServerList.php?Poll=1")
......@@ -99,7 +99,7 @@ async def status_task():
for ongoing in currentGames.keys():
if ongoing not in [x['name'] for x in games]:
out += [f"The {ongoing} game is finished. Final score: {currentGames[ongoing]['score']}"]
out += [f"The {ongoing} game is finished. Final score: `{currentGames[ongoing]['score']}`"]
nix += [ongoing]
for xin in nix:
del currentGames[xin]
......@@ -114,7 +114,7 @@ async def status_task():
currentGames[game['name']] = game
else:
try:
s = f"{game['name']} (elo: {game['elo']}, rep: {game['reputation']}%) wants to play a {game['game_info']['nb_set']}-set match. (Preview: {previewStrings[game['game_info']['preview']]}. Control: {controlStrings[game['game_info']['control_mode']]}. Skill: {skillStrings[game['game_info']['skill_mode']]}.)"
s = f"{game['name']} (elo: `{game['elo']}`, rep: `{game['reputation']}%`) wants to play a `{game['game_info']['nb_set']}-set` match. (Preview: `{previewStrings[game['game_info']['preview']]}`. Control: `{controlStrings[game['game_info']['control_mode']]}`. Skill: `{skillStrings[game['game_info']['skill_mode']]}`.)"
except:
pprint.pprint(game)
s = ""
......
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