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
36894e21
Commit
36894e21
authored
Nov 13, 2021
by
Trevor Cappallo
Browse files
or not
parent
7c3f68af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
te4.py
te4.py
+14
-14
No files found.
te4.py
View file @
36894e21
...
...
@@ -170,20 +170,20 @@ async def status_task():
with
open
(
'all.log'
,
'a'
)
as
f
:
f
.
write
(
f
"[
{
str
(
datetime
.
datetime
.
now
()).
split
(
'.'
)[
0
]
}
] >
{
pprint
.
pformat
(
line
)
}
\n
"
)
myMessages
.
append
((
line
,
await
ch
.
send
(
line
)))
removed
=
False
if
") wants to play a "
in
line
:
pName
=
line
.
split
(
"**"
)[
1
]
for
i
in
range
(
len
(
myMessages
)
-
2
,
max
(
len
(
myMessages
)
-
50
,
1
),
-
1
):
if
pName
in
myMessages
[
i
][
0
]:
if
") wants to play a "
in
myMessages
[
i
][
0
]:
# s = f'~~{myMessages[i][0]}~~'
pprint
.
pprint
(
myMessages
[
i
])
with
open
(
'all.log'
,
'a'
)
as
f
:
f
.
write
(
f
"[
{
str
(
datetime
.
datetime
.
now
()).
split
(
'.'
)[
0
]
}
] x
{
pprint
.
pformat
(
myMessages
[
i
][
0
])
}
\n
"
)
await
myMessages
[
i
][
1
].
delete
()
myMessages
.
pop
(
i
)
removed
=
True
break
#
removed = False
#
if ") wants to play a " in line:
#
pName = line.split("**")[1]
#
for i in range(len(myMessages)-2,max(len(myMessages)-50,1),-1):
#
if pName in myMessages[i][0]:
#
if ") wants to play a " in myMessages[i][0]:
#
# s = f'~~{myMessages[i][0]}~~'
#
pprint.pprint(myMessages[i])
#
with open('all.log', 'a') as f:
#
f.write(f"[{str(datetime.datetime.now()).split('.')[0]}] x {pprint.pformat(myMessages[i][0])}\n")
#
await myMessages[i][1].delete()
#
myMessages.pop(i)
#
removed = True
#
break
...
...
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