fix(trigger): require names for trigger creation

This commit is contained in:
chengyongru
2026-07-02 13:32:46 +08:00
committed by Xubin Ren
parent 7178ea3f13
commit b690a48336
10 changed files with 60 additions and 19 deletions
+2 -2
View File
@@ -867,7 +867,7 @@ async def test_slash_new_is_blocked_for_disallowed_user() -> None:
assert handled == []
@pytest.mark.parametrize("slash_name", ["stop", "restart", "status", "history", "model", "trigger"])
@pytest.mark.parametrize("slash_name", ["stop", "restart", "status", "history", "model"])
@pytest.mark.asyncio
async def test_slash_commands_forward_via_handle_message(slash_name: str) -> None:
channel = DiscordChannel(DiscordConfig(enabled=True, allow_from=["*"]), MessageBus())
@@ -919,7 +919,7 @@ async def test_slash_model_forwards_optional_preset() -> None:
@pytest.mark.asyncio
async def test_slash_trigger_forwards_optional_name() -> None:
async def test_slash_trigger_forwards_required_name() -> None:
channel = DiscordChannel(DiscordConfig(enabled=True, allow_from=["*"]), MessageBus())
handled: list[dict] = []