Delete setting if keyerror occurs
This commit is contained in:
parent
04561838e1
commit
eb2d50fad3
1 changed files with 1 additions and 0 deletions
|
@ -222,6 +222,7 @@ class SettingsCog(Cog):
|
|||
try:
|
||||
value = await ctx.guild.fetch_role(value)
|
||||
except KeyError:
|
||||
await setting.delete()
|
||||
value = None
|
||||
if value:
|
||||
value = value.mention
|
||||
|
|
Loading…
Add table
Reference in a new issue