From 8fde389664ca59773c38dc0ec1a434a98bc2428b Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Mon, 16 Dec 2024 23:46:17 +0100 Subject: command-type only roles --- py/context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'py/context.py') diff --git a/py/context.py b/py/context.py index f1eacd6..87c3a14 100644 --- a/py/context.py +++ b/py/context.py @@ -92,7 +92,8 @@ def load_role_config(role): enhance_roles_with_custom_function(roles) - if not role in roles: + postfixes = ["", ".complete", ".edit", ".chat"] + if not any([f"{role}{postfix}" in roles for postfix in postfixes]): raise Exception(f"Role `{role}` not found") if is_deprecated_role_syntax(roles, role): -- cgit v1.2.3