From 89ce9bbca22c33c87f081efb58eff1ef6f48ba17 Mon Sep 17 00:00:00 2001 From: ningmengchongshui <916415899@qq.com> Date: Tue, 11 Jun 2024 22:10:46 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps.ts | 26 +++++++++++++------------- apps/add.ts | 12 ++++++------ apps/disFriPoke.ts | 4 ++-- apps/{disablePrivate.ts => disPri.ts} | 4 ++-- apps/example2.ts | 2 +- apps/friend.ts | 6 +++--- apps/invite.ts | 4 ++-- apps/newcomer.ts | 2 +- apps/outNotice.ts | 2 +- apps/quit.ts | 4 ++-- apps/restart.ts | 2 +- apps/sendLog.ts | 4 ++-- apps/status.ts | 4 ++-- apps/update.ts | 8 ++++---- hello.tsx | 12 ++++++++++++ package.json | 17 +++++++++-------- routes.tsx | 10 ++++++++++ 17 files changed, 73 insertions(+), 50 deletions(-) rename apps/{disablePrivate.ts => disPri.ts} (94%) create mode 100644 hello.tsx create mode 100644 routes.tsx diff --git a/apps.ts b/apps.ts index c48df00..83debcd 100644 --- a/apps.ts +++ b/apps.ts @@ -3,16 +3,16 @@ * 不想开启的功能,自行注释 * ***** */ -export * from './apps/add' -export * from './apps/disFriPoke' -export * from './apps/disablePrivate' -export * from './apps/friend' -export * from './apps/invite' -export * from './apps/quit' -export * from './apps/restart' -export * from './apps/sendLog' -export * from './apps/status' -export * from './apps/update' -export * from './apps/example2' -export * from './apps/newcomer' -export * from './apps/outNotice' \ No newline at end of file +export * from './apps/add.js' +export * from './apps/disFriPoke.js' +export * from './apps/disPri.js' +export * from './apps/friend.js' +export * from './apps/invite.js' +export * from './apps/quit.js' +export * from './apps/restart.js' +export * from './apps/sendLog.js' +export * from './apps/status.js' +export * from './apps/update.js' +export * from './apps/example2.js' +export * from './apps/newcomer.js' +export * from './apps/outNotice.js' \ No newline at end of file diff --git a/apps/add.ts b/apps/add.ts index d62ca33..8169cc3 100644 --- a/apps/add.ts +++ b/apps/add.ts @@ -5,9 +5,9 @@ import { pipeline } from 'stream' import { promisify } from 'util' import fetch from 'node-fetch' import moment from 'moment' -import { ConfigController as cfg } from '#miao/config' -import { plugin } from '#miao/core' -import * as common from '#miao/core' +import { ConfigController as cfg } from 'yunzai/config' +import { plugin } from 'yunzai/core' +import { makeForwardMsg } from 'yunzai/core' const textArr = {} @@ -846,7 +846,7 @@ export class add extends plugin { title = `表情${search},${count}条` } - let forwardMsg = await common.makeForwardMsg(this.e, [title, ...result], title) + let forwardMsg = await makeForwardMsg(this.e, [title, ...result], title) this.e.reply(forwardMsg) } @@ -922,7 +922,7 @@ export class add extends plugin { let faces = textArr[this.group_id].get(keyWord) || [] let globalfaces = textArr[this.e.bot.uin].get(keyWord) || [] faces = [...faces, ...globalfaces] - + if (lodash.isEmpty(faces)) { await this.e.reply(`表情${keyWord}不存在`) return @@ -959,7 +959,7 @@ export class add extends plugin { return } - let forwardMsg = await common.makeForwardMsg(this.e, replyArr, `表情${keyWord}详情`) + let forwardMsg = await makeForwardMsg(this.e, replyArr, `表情${keyWord}详情`) this.e.reply(forwardMsg) } diff --git a/apps/disFriPoke.ts b/apps/disFriPoke.ts index 1e3a397..537a96d 100644 --- a/apps/disFriPoke.ts +++ b/apps/disFriPoke.ts @@ -1,6 +1,6 @@ -import { ConfigController as cfg } from '#miao/config' -import { plugin } from '#miao/core' +import { ConfigController as cfg } from 'yunzai/config' +import { plugin } from 'yunzai/core' /** * */ diff --git a/apps/disablePrivate.ts b/apps/disPri.ts similarity index 94% rename from apps/disablePrivate.ts rename to apps/disPri.ts index a226954..6a25eb8 100644 --- a/apps/disablePrivate.ts +++ b/apps/disPri.ts @@ -1,6 +1,6 @@ -import { ConfigController as cfg } from '#miao/config' -import { plugin } from '#miao/core' +import { ConfigController as cfg } from 'yunzai/config' +import { plugin } from 'yunzai/core' /** * */ diff --git a/apps/example2.ts b/apps/example2.ts index f8499f7..ad4e0b4 100644 --- a/apps/example2.ts +++ b/apps/example2.ts @@ -1,4 +1,4 @@ -import { plugin } from '#miao/core' +import { plugin } from 'yunzai/core' /** * */ diff --git a/apps/friend.ts b/apps/friend.ts index 53e33ca..3d0d476 100644 --- a/apps/friend.ts +++ b/apps/friend.ts @@ -1,7 +1,7 @@ -import { ConfigController as cfg } from '#miao/config' -import { sleep } from '#miao/utils' -import { plugin } from '#miao/core' +import { ConfigController as cfg } from 'yunzai/config' +import { sleep } from 'yunzai/utils' +import { plugin } from 'yunzai/core' /** * */ diff --git a/apps/invite.ts b/apps/invite.ts index 7419d61..2c7fb57 100644 --- a/apps/invite.ts +++ b/apps/invite.ts @@ -1,6 +1,6 @@ -import { ConfigController as cfg } from '#miao/config' -import { plugin } from '#miao/core' +import { ConfigController as cfg } from 'yunzai/config' +import { plugin } from 'yunzai/core' /** * */ diff --git a/apps/newcomer.ts b/apps/newcomer.ts index 6ca3a04..d6b5d3a 100644 --- a/apps/newcomer.ts +++ b/apps/newcomer.ts @@ -1,4 +1,4 @@ -import { plugin, segment } from '#miao/core' +import { plugin, segment } from 'yunzai/core' /** * */ diff --git a/apps/outNotice.ts b/apps/outNotice.ts index f44261a..47a97ae 100644 --- a/apps/outNotice.ts +++ b/apps/outNotice.ts @@ -1,4 +1,4 @@ -import { plugin } from '#miao/core' +import { plugin } from 'yunzai/core' export class outNotice extends plugin { tips = '退群了' constructor() { diff --git a/apps/quit.ts b/apps/quit.ts index 5c15995..c6972f3 100644 --- a/apps/quit.ts +++ b/apps/quit.ts @@ -1,5 +1,5 @@ -import { ConfigController as cfg } from '#miao/config' -import { plugin } from '#miao/core' +import { ConfigController as cfg } from 'yunzai/config' +import { plugin } from 'yunzai/core' /** * */ diff --git a/apps/restart.ts b/apps/restart.ts index aa24a7b..03cb9f4 100644 --- a/apps/restart.ts +++ b/apps/restart.ts @@ -1,4 +1,4 @@ -import { plugin } from '#miao/core' +import { plugin } from 'yunzai/core' import fetch from 'node-fetch' import net from 'net' import fs from 'fs' diff --git a/apps/sendLog.ts b/apps/sendLog.ts index 7fd726e..9a4859d 100644 --- a/apps/sendLog.ts +++ b/apps/sendLog.ts @@ -1,5 +1,5 @@ -import { plugin } from '#miao/core' -import {makeForwardMsg} from '#miao/core' +import { plugin } from 'yunzai/core' +import {makeForwardMsg} from 'yunzai/core' import fs from "node:fs" import lodash from "lodash" import moment from "moment" diff --git a/apps/status.ts b/apps/status.ts index 78f278c..3588d74 100644 --- a/apps/status.ts +++ b/apps/status.ts @@ -1,7 +1,7 @@ -import { ConfigController as cfg } from '#miao/config' +import { ConfigController as cfg } from 'yunzai/config' import moment from 'moment' -import { plugin } from '#miao/core' +import { plugin } from 'yunzai/core' /** * */ diff --git a/apps/update.ts b/apps/update.ts index 11f00f4..07c788b 100644 --- a/apps/update.ts +++ b/apps/update.ts @@ -1,11 +1,11 @@ -import { makeForwardMsg, plugin } from '#miao/core' +import { makeForwardMsg, plugin } from 'yunzai/core' import lodash from 'lodash' import fs from 'node:fs' import { Restart } from './restart.js' -import {} from '#miao/core' -import { sleep } from '#miao/utils' +import {} from 'yunzai/core' +import { sleep } from 'yunzai/utils' import { exec, execSync } from 'child_process' -import { BOT_NAME } from '#miao/config' +import { BOT_NAME } from 'yunzai/config' let uping = false diff --git a/hello.tsx b/hello.tsx new file mode 100644 index 0000000..b9b6c34 --- /dev/null +++ b/hello.tsx @@ -0,0 +1,12 @@ +import React from 'react' +export type DataType = { + name: string +} +export type PropsType = { + data: DataType +} +export default function App({ data }: PropsType) { + return ( +
Hello, {data.name}!
+ ) +} \ No newline at end of file diff --git a/package.json b/package.json index 66373eb..65afc75 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { "name": "system-plugin", - "version": "1.0.0-rc.0", - "author": "Yoimiya-Kokomi, Le-niao", - "description": "QQ Group Bot", - "main": "./index.js", - "private":true, "type": "module", - "scripts": {}, - "dependencies": {}, - "devDependencies": {} + "scripts": { + }, + "dependencies": { + "image-size": "^1.0.2" + }, + "devDependencies": { + "cheerio": "1.0.0-rc.12", + "request": "^2.88.2" + } } diff --git a/routes.tsx b/routes.tsx new file mode 100644 index 0000000..df8e8b6 --- /dev/null +++ b/routes.tsx @@ -0,0 +1,10 @@ +import React from "react" +import { type RouterType } from "yunzai/image/types" +import Hello from "./hello.tsx" +const Config: RouterType = [ + { + url: "/", + element: + } +] +export default Config \ No newline at end of file