Permissions YAML validation incorrect feedback
Flame442 opened this issue · comments
Running [p]permissions acl setserver
(or setglobal
) with the valid YAML data below causes the message Your YAML file did not match the schema: Top-level keys must be either COG or COMMAND.
to appear.
COMMAND:
addrole:
55555555555:
The error is the fact that the snowflake does not have an explicit true
/false
value associated with it, so it is implicitly null
. The same error happens if the snowflake is explicitly null
, or is any other non-boolean value.
The logic for validating raw YAML inputs seems to not be selecting the correct error message for what is actually wrong with the schema.
Red-DiscordBot/redbot/cogs/permissions/permissions.py
Lines 39 to 76 in bb2e368
Duplicate of #3185, feel free to comment with your example there but the issue comes down to the same thing.