Handle user leaving during processing

pull/124/head
bobloy 4 years ago
parent c62cde4159
commit 9ddb1696ac

@ -195,7 +195,7 @@ class Timerole(Cog):
await member.add_roles(role, reason="Timerole") await member.add_roles(role, reason="Timerole")
else: else:
await member.remove_roles(role, reason="Timerole") await member.remove_roles(role, reason="Timerole")
except discord.Forbidden: except (discord.Forbidden, discord.NotFound) as e:
results += "{} : {} **(Failed)**\n".format(member.display_name, role.name) results += "{} : {} **(Failed)**\n".format(member.display_name, role.name)
else: else:
results += "{} : {}\n".format(member.display_name, role.name) results += "{} : {}\n".format(member.display_name, role.name)

Loading…
Cancel
Save