🚀 测试文档工作流
This commit is contained in:
@ -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"):
|
||||
|
@ -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启动器",
|
||||
|
19
src/liteyuki_plugins/ts_sm_ly.py
Normal file
19
src/liteyuki_plugins/ts_sm_ly.py
Normal 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)
|
@ -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(
|
||||
|
||||
|
@ -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
|
||||
)
|
||||
|
18
src/nonebot_plugins/nonebot-plugin-toliteyuki/__init__.py
Normal file
18
src/nonebot_plugins/nonebot-plugin-toliteyuki/__init__.py
Normal 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
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* @type {{
|
||||
* @type_ {{
|
||||
* results: Array<{
|
||||
* abstracts: string,
|
||||
* createdDt: string,
|
||||
|
@ -12,7 +12,7 @@
|
||||
* @property {Weather} weather - The weather data.
|
||||
*/
|
||||
|
||||
/** @type {Data} */
|
||||
/** @type_ {Data} */
|
||||
|
||||
let data = JSON.parse(document.getElementById("data").innerText)
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user