diff --git a/bot/libs/utils/help.py b/bot/libs/utils/help.py index 454576f..2786745 100644 --- a/bot/libs/utils/help.py +++ b/bot/libs/utils/help.py @@ -13,7 +13,9 @@ # Light Orange (255, 199, 184) - Used for command pages -def process_perms_name(command: Union[commands.Group, commands.Command]): +def process_perms_name( + command: Union[commands.Group, commands.Command] +) -> Optional[str]: merge_list = [] if ( all(isinstance(parent, commands.Group) for parent in command.parents) @@ -28,6 +30,8 @@ def process_perms_name(command: Union[commands.Group, commands.Command]): merge_list.extend([*command.extras["permissions"]]) perms_set = sorted(set(merge_list)) + if len(perms_set) == 0: + return None return ", ".join(name.replace("_", " ").title() for name in perms_set)