add in exception catch

This commit is contained in:
Brandon 2022-11-01 23:59:09 -04:00
parent e5d3a81057
commit 42f3420a7a

View file

@ -2000,8 +2000,13 @@ class ActivityLogger(commands.Cog):
data.remove(msg)
for i, message in enumerate(data):
user1_id = int(message.split("(id:")[1].split(")")[0])
user1 = guild.get_member(user1_id)
try:
user1_id = int(message.split("(id:")[1].split(")")[0])
user1 = guild.get_member(user1_id)
except IndexError:
pass
except KeyError:
pass
if user1 is None:
continue