Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Trevor Cappallo
TE4bot
Commits
8dac27ec
Commit
8dac27ec
authored
Nov 02, 2021
by
Trevor Cappallo
Browse files
detect completed games using score field
parent
c50e9136
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
te4.py
te4.py
+6
-0
No files found.
te4.py
View file @
8dac27ec
...
...
@@ -93,6 +93,12 @@ async def status_task():
newGames
=
[
x
for
x
in
newGames
if
sorted
([
str
(
y
)
for
y
in
x
.
values
()])
not
in
oldGames
]
out
=
[]
nix
=
[]
for
game
in
info
[
'games'
]:
if
"..."
not
in
game
[
'score'
]
and
" -- "
not
in
game
[
'score'
]:
out
+=
[
f
"The
{
game
[
'name'
]
}
game is finished. The final score was
{
game
[
'score'
]
}
."
]
if
game
[
'name'
]
in
currentGames
.
keys
():
del
currentGames
[
game
[
'name'
]]
for
ongoing
in
currentGames
.
keys
():
if
ongoing
not
in
[
x
[
'name'
]
for
x
in
info
[
'games'
]]:
out
+=
[
f
"The
{
ongoing
}
game is finished. Final score:
{
currentGames
[
ongoing
][
'score'
]
}
"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment