mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-19 03:42:33 +12:00
add in exception catch
This commit is contained in:
parent
e5d3a81057
commit
42f3420a7a
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue