1
0
forked from bot/app

🚀 测试文档工作流

This commit is contained in:
2024-08-19 23:47:39 +08:00
parent 55a427e344
commit 6dcb085b53
48 changed files with 316 additions and 1704 deletions

View File

@ -299,7 +299,7 @@ async def test_for_md_image(bot: T_Bot, api: str, data: dict):
session_id = data.get("group_id")
else:
return
if len(data.get("message", [])) == 1 and data["message"][0].get("type") == "image":
if len(data.get("message", [])) == 1 and data["message"][0].get("type_") == "image":
file: str = data["message"][0].data.get("file")
# file:// http:// base64://
if file.startswith("http"):

View File

@ -12,7 +12,7 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
import nonebot
from liteyuki.utils import IS_MAIN_PROCESS
from liteyuki.plugin import PluginMetadata, PluginType
from .nb_utils import adapter_manager, driver_manager # type: ignore
from .nb_utils import adapter_manager, driver_manager # type_: ignore
__plugin_meta__ = PluginMetadata(
name="NoneBot2启动器",

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
"""
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
@Time : 2024/8/19 下午8:57
@Author : snowykami
@Email : snowykami@outlook.com
@File : ts_sm.py
@Software: PyCharm
"""
import asyncio
from liteyuki.comm.storage import shared_memory
from liteyuki import get_bot
@shared_memory.on_subscriber_receive("to_liteyuki")
async def _(data):
print("主进程接收数据async", data)

View File

@ -1,8 +1,8 @@
from nonebot.plugin import PluginMetadata
from liteyuki import get_bot
from .crt_matchers import * # type: ignore
from .rt_guide import * # type: ignore
from .crt_matchers import * # type_: ignore
from .rt_guide import * # type_: ignore
__plugin_meta__ = PluginMetadata(

View File

@ -339,7 +339,7 @@ async def _(result: Arparma, event: T_MessageEvent, bot: T_Bot, npm: Matcher):
await md.send_md(f"{info}\n\n" f"```\n{log}\n```", bot, event=event)
elif sc.get("uninstall") and perm_s:
plugin_name: str = result.subcommands["uninstall"].args.get("plugin_name") # type: ignore
plugin_name: str = result.subcommands["uninstall"].args.get("plugin_name") # type_: ignore
found_installed_plugin: InstalledPlugin = plugin_db.where_one(
InstalledPlugin(), "module_name = ?", plugin_name
)

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
"""
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
@Time : 2024/8/19 下午10:30
@Author : snowykami
@Email : snowykami@outlook.com
@File : __init__.py.py
@Software: PyCharm
"""
from nonebot import require
from liteyuki.comm.storage import shared_memory
require("nonebot_plugin_alconna")
from nonebot_plugin_alconna import UniMessage, Command, on_alconna

View File

@ -2,7 +2,7 @@
/**
* @type {{
* @type_ {{
* results: Array<{
* abstracts: string,
* createdDt: string,

View File

@ -12,7 +12,7 @@
* @property {Weather} weather - The weather data.
*/
/** @type {Data} */
/** @type_ {Data} */
let data = JSON.parse(document.getElementById("data").innerText)

View File

@ -110,7 +110,7 @@ class Database:
*args:
Returns:
"""
table_list = [item[0] for item in self.cursor.execute("SELECT name FROM sqlite_master WHERE type='table'").fetchall()]
table_list = [item[0] for item in self.cursor.execute("SELECT name FROM sqlite_master WHERE type_='table'").fetchall()]
for model in args:
logger.debug(f"Upserting {model}")
if not model.TABLE_NAME:

View File

@ -83,14 +83,14 @@ class MarkdownMessage:
"send_private_forward_msg",
messages=[
{
"type": "node",
"type_": "node",
"data": {
"content": [
{
"data": {
"content": "{\"content\":\"%s\"}" % formatted_md,
},
"type": "markdown"
"type_": "markdown"
}
],
"name": "[]",
@ -107,7 +107,7 @@ class MarkdownMessage:
message_type=message_type,
message=[
{
"type": "longmsg",
"type_": "longmsg",
"data": {
"id": forward_id
}
@ -156,7 +156,7 @@ class MarkdownMessage:
Args:
image: 图片字节流或图片本地路径链接请使用Markdown.image_async方法获取后通过send_md发送
bot: bot instance
message_type: message type
message_type: message type_
session_id: session id
event: event
kwargs: other arguments