Delete invalid rolepings
This commit is contained in:
parent
38b86d4694
commit
0c97e8096a
1 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,9 @@ class RolepingCog(Scale):
|
|||
embeds = []
|
||||
for roleping in rolepings:
|
||||
role = await ctx.guild.fetch_role(roleping.role)
|
||||
if not role:
|
||||
await roleping.delete()
|
||||
continue
|
||||
broles = find_all(lambda x: x.id in roleping.bypass["roles"], ctx.guild.roles)
|
||||
bypass_roles = [r.mention or "||`[redacted]`||" for r in broles]
|
||||
bypass_users = [
|
||||
|
|
Loading…
Add table
Reference in a new issue