miao-plugin/apps/character.js

37 lines
931 B
JavaScript
Raw Normal View History

2022-10-06 22:20:46 +00:00
import { uploadCharacterImg } from './character/ImgUpload.js'
import { getOriginalPicture } from './profile/ProfileUtils.js'
import Avatar from './character/AvatarCard.js'
import Wife from './character/AvatarWife.js'
2023-03-07 17:52:11 +00:00
import { App } from '#miao'
2022-09-16 20:37:09 +00:00
let app = App.init({
id: 'character',
2022-09-16 22:01:31 +00:00
name: '角色查询'
2022-09-16 20:37:09 +00:00
})
app.reg({
character: {
rule: /^#喵喵角色卡片$/,
fn: Avatar.render,
check: Avatar.check,
name: '角色卡片'
},
uploadImg: {
rule: /^#*(喵喵)?(上传|添加)(.+)(照片|写真|图片|图像)\s*$/,
fn: uploadCharacterImg,
name: '上传角色写真'
},
wife: {
rule: Wife.reg,
fn: Wife.render,
describe: '#老公 #老婆 查询'
},
originalPic: {
rule: /^#?(获取|给我|我要|求|发|发下|发个|发一下)?原图(吧|呗)?$/,
fn: getOriginalPicture,
describe: '【#原图】 回复角色卡片,可获取原图'
}
2022-09-16 20:37:09 +00:00
})
export default app