update: 修改

This commit is contained in:
ningmengchongshui 2024-06-11 22:10:46 +08:00
parent bf1cdde5d1
commit 89ce9bbca2
17 changed files with 73 additions and 50 deletions

26
apps.ts
View File

@ -3,16 +3,16 @@
* *
* ***** * *****
*/ */
export * from './apps/add' export * from './apps/add.js'
export * from './apps/disFriPoke' export * from './apps/disFriPoke.js'
export * from './apps/disablePrivate' export * from './apps/disPri.js'
export * from './apps/friend' export * from './apps/friend.js'
export * from './apps/invite' export * from './apps/invite.js'
export * from './apps/quit' export * from './apps/quit.js'
export * from './apps/restart' export * from './apps/restart.js'
export * from './apps/sendLog' export * from './apps/sendLog.js'
export * from './apps/status' export * from './apps/status.js'
export * from './apps/update' export * from './apps/update.js'
export * from './apps/example2' export * from './apps/example2.js'
export * from './apps/newcomer' export * from './apps/newcomer.js'
export * from './apps/outNotice' export * from './apps/outNotice.js'

View File

@ -5,9 +5,9 @@ import { pipeline } from 'stream'
import { promisify } from 'util' import { promisify } from 'util'
import fetch from 'node-fetch' import fetch from 'node-fetch'
import moment from 'moment' import moment from 'moment'
import { ConfigController as cfg } from '#miao/config' import { ConfigController as cfg } from 'yunzai/config'
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
import * as common from '#miao/core' import { makeForwardMsg } from 'yunzai/core'
const textArr = {} const textArr = {}
@ -846,7 +846,7 @@ export class add extends plugin {
title = `表情${search}${count}` 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) this.e.reply(forwardMsg)
} }
@ -922,7 +922,7 @@ export class add extends plugin {
let faces = textArr[this.group_id].get(keyWord) || [] let faces = textArr[this.group_id].get(keyWord) || []
let globalfaces = textArr[this.e.bot.uin].get(keyWord) || [] let globalfaces = textArr[this.e.bot.uin].get(keyWord) || []
faces = [...faces, ...globalfaces] faces = [...faces, ...globalfaces]
if (lodash.isEmpty(faces)) { if (lodash.isEmpty(faces)) {
await this.e.reply(`表情${keyWord}不存在`) await this.e.reply(`表情${keyWord}不存在`)
return return
@ -959,7 +959,7 @@ export class add extends plugin {
return return
} }
let forwardMsg = await common.makeForwardMsg(this.e, replyArr, `表情${keyWord}详情`) let forwardMsg = await makeForwardMsg(this.e, replyArr, `表情${keyWord}详情`)
this.e.reply(forwardMsg) this.e.reply(forwardMsg)
} }

View File

@ -1,6 +1,6 @@
import { ConfigController as cfg } from '#miao/config' import { ConfigController as cfg } from 'yunzai/config'
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
/** /**
* *
*/ */

View File

@ -1,6 +1,6 @@
import { ConfigController as cfg } from '#miao/config' import { ConfigController as cfg } from 'yunzai/config'
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
/** /**
* *
*/ */

View File

@ -1,4 +1,4 @@
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
/** /**
* *
*/ */

View File

@ -1,7 +1,7 @@
import { ConfigController as cfg } from '#miao/config' import { ConfigController as cfg } from 'yunzai/config'
import { sleep } from '#miao/utils' import { sleep } from 'yunzai/utils'
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
/** /**
* *
*/ */

View File

@ -1,6 +1,6 @@
import { ConfigController as cfg } from '#miao/config' import { ConfigController as cfg } from 'yunzai/config'
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
/** /**
* *
*/ */

View File

@ -1,4 +1,4 @@
import { plugin, segment } from '#miao/core' import { plugin, segment } from 'yunzai/core'
/** /**
* *
*/ */

View File

@ -1,4 +1,4 @@
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
export class outNotice extends plugin { export class outNotice extends plugin {
tips = '退群了' tips = '退群了'
constructor() { constructor() {

View File

@ -1,5 +1,5 @@
import { ConfigController as cfg } from '#miao/config' import { ConfigController as cfg } from 'yunzai/config'
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
/** /**
* *
*/ */

View File

@ -1,4 +1,4 @@
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
import fetch from 'node-fetch' import fetch from 'node-fetch'
import net from 'net' import net from 'net'
import fs from 'fs' import fs from 'fs'

View File

@ -1,5 +1,5 @@
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
import {makeForwardMsg} from '#miao/core' import {makeForwardMsg} from 'yunzai/core'
import fs from "node:fs" import fs from "node:fs"
import lodash from "lodash" import lodash from "lodash"
import moment from "moment" import moment from "moment"

View File

@ -1,7 +1,7 @@
import { ConfigController as cfg } from '#miao/config' import { ConfigController as cfg } from 'yunzai/config'
import moment from 'moment' import moment from 'moment'
import { plugin } from '#miao/core' import { plugin } from 'yunzai/core'
/** /**
* *
*/ */

View File

@ -1,11 +1,11 @@
import { makeForwardMsg, plugin } from '#miao/core' import { makeForwardMsg, plugin } from 'yunzai/core'
import lodash from 'lodash' import lodash from 'lodash'
import fs from 'node:fs' import fs from 'node:fs'
import { Restart } from './restart.js' import { Restart } from './restart.js'
import {} from '#miao/core' import {} from 'yunzai/core'
import { sleep } from '#miao/utils' import { sleep } from 'yunzai/utils'
import { exec, execSync } from 'child_process' import { exec, execSync } from 'child_process'
import { BOT_NAME } from '#miao/config' import { BOT_NAME } from 'yunzai/config'
let uping = false let uping = false

12
hello.tsx Normal file
View File

@ -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 (
<div className="text-red-500 p-2 text-xl m-80">Hello, {data.name}!</div>
)
}

View File

@ -1,12 +1,13 @@
{ {
"name": "system-plugin", "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", "type": "module",
"scripts": {}, "scripts": {
"dependencies": {}, },
"devDependencies": {} "dependencies": {
"image-size": "^1.0.2"
},
"devDependencies": {
"cheerio": "1.0.0-rc.12",
"request": "^2.88.2"
}
} }

10
routes.tsx Normal file
View File

@ -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: <Hello data={{ name: "word" }} />
}
]
export default Config