almost there

This commit is contained in:
Brandon 2022-11-02 01:24:57 -04:00
parent 24f306f515
commit bf08c3e7ee

View file

@ -1948,7 +1948,7 @@ class ActivityLogger(commands.Cog):
# ignore for now, need to figure out how to filter out when the bot fails to log a user leaving
for message in data:
try:
user_id = int(message.split("(id")[-1].split(")")[0].strip())
user_id = int(message.split("(id")[-1].split(")")[0].strip().strip(":"))
user = guild.get_member(user_id)
if not user:
continue
@ -1993,6 +1993,8 @@ class ActivityLogger(commands.Cog):
pass
except KeyError: # not sure why this happens... TODO figure it out
pass
except ValueError:
pass
else:
to_delete = []
for message in data:
@ -2035,6 +2037,8 @@ class ActivityLogger(commands.Cog):
pass
except KeyError: # not sure why this happens... TODO figure it out
pass
except ValueError:
pass
# get messages around current message and add weights
for j in range(max(i - 5, 0), i):
@ -2137,7 +2141,7 @@ class ActivityLogger(commands.Cog):
# ignore for now, need to figure out how to filter out when the bot fails to log a user leaving
for message in data:
try:
user_id = int(message.split("(id")[-1].split(")")[0].strip())
user_id = int(message.split("(id")[-1].split(")")[0].strip().strip(":"))
user = guild.get_member(user_id)
if not user:
continue
@ -2189,6 +2193,8 @@ class ActivityLogger(commands.Cog):
pass
except KeyError: # not sure why this happens... TODO figure it out
pass
except ValueError:
pass
else:
to_delete = []
for message in data:
@ -2226,6 +2232,8 @@ class ActivityLogger(commands.Cog):
pass
except KeyError: # not sure why this happens... TODO figure it out
pass
except ValueError:
pass
# get messages around current message and add weights
for j in range(max(i - 5, 0), i):