mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-02 19:43:37 +12:00
almost there
This commit is contained in:
parent
24f306f515
commit
bf08c3e7ee
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue