Finessed game create and delete commands

This commit is contained in:
2021-07-19 15:30:04 +01:00
parent 4277ef4f91
commit 304dd9f9de
12 changed files with 489 additions and 192 deletions

View File

@ -19,7 +19,7 @@ class on_guild_role_delete(commands.Cog, name='On Guild Role Delete Events'):
conf = yaml_load(configFile)
#### Bot will only respond if the role is not a bot-managed role, and the role is an admin role
if role.id in conf[str(role.guild.id)]['roles']['admin']:
conf[str(role.guild.id)]['roles']['adminroles'].remove(role.id)
conf[str(role.guild.id)]['roles']['admin'].remove(role.id)
yaml_dump(conf, configFile)
#### If the role is one of the Admin roles and is deleted, updates the bot's config to delete that role, preventing unnecessary roles from accumulating.