Fix wrong perm variable used in for loop.
@@ -374,15 +374,18 @@ class SlashCommand:
existing_perms = await self.req.get_all_command_permissions(guild_id)
new_perms = permissions_map[guild_id]
+ print(existing_perms)
+ print(new_perms)
+
changed = False
if len(existing_perms) != len(new_perms):
changed = True
else:
existing_perms_model = {}
- for perm in existing_perms:
- existing_perms_model[perm["id"]] = model.PermissionsData(**perm)
+ for existing_perm in existing_perms:
+ existing_perms_model[existing_perm["id"]] = model.PermissionsData(**existing_perm)
for new_perm in new_perms:
- if existing_perms_model[perm["id"]] != model.PermissionsData(**new_perm):
+ if existing_perms_model[new_perm["id"]] != model.PermissionsData(**new_perm):
changed = True
break
