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
07c4d224
Commit
07c4d224
authored
Nov 06, 2021
by
Trevor Cappallo
Browse files
tweaks
parent
d5f5f8d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
te4.py
te4.py
+3
-3
No files found.
te4.py
View file @
07c4d224
...
...
@@ -85,7 +85,7 @@ async def on_ready():
ch
=
discord
.
utils
.
get
(
channels
,
name
=
"find-a-game"
)
status_task
.
start
()
@
tasks
.
loop
(
seconds
=
1
5.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
=
""
...
...
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