From 707f01771869105b3618ffa986e9e9416f4362d9 Mon Sep 17 00:00:00 2001 From: Asankilp Date: Tue, 8 Apr 2025 00:24:34 +0800 Subject: [PATCH] argot test command --- nonebot_plugin_marshoai/dev.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/nonebot_plugin_marshoai/dev.py b/nonebot_plugin_marshoai/dev.py index 1369806..956fc30 100644 --- a/nonebot_plugin_marshoai/dev.py +++ b/nonebot_plugin_marshoai/dev.py @@ -1,10 +1,11 @@ import os from pathlib import Path -from nonebot import get_driver, logger, require +from nonebot import get_driver, logger, on_command, require from nonebot.adapters import Bot, Event from nonebot.matcher import Matcher from nonebot.typing import T_State +from nonebot_plugin_argot import add_argot, get_message_id from nonebot_plugin_marshoai.plugin.load import reload_plugin @@ -48,6 +49,21 @@ function_call = on_alconna( permission=SUPERUSER, ) +argot_test = on_command("argot", permission=SUPERUSER) + + +@argot_test.handle() +async def _(): + await argot_test.send( + "aa", + argot={ + "name": "test", + "command": "test", + "segment": f"{os.getcwd()}", + "expired_at": 1000, + }, + ) + @function_call.assign("list") async def list_functions():