koishi-plugin-assets-xinyewapi
v0.1.1
Published
Serve assets on [api.xinyew.cn](https://api.xinyew.cn/)
Downloads
244
Maintainers
Readme
koishi-plugin-assets-xinyewapi
基于图床 api.xinyew.cn 的资源转存服务。
文档
https://assets.koishi.chat/zh-CN/api.html
示例用法
import { Context, Schema } from 'koishi'
import { } from '@koishijs/assets'
export const name = 'assets-test'
export const inject = ["assets"]
export interface Config { }
export const Config: Schema<Config> = Schema.object({})
export function apply(ctx: Context) {
// write your plugin here
ctx
.command('测试图床')
.action(async ({ session }) => {
const aaa = await ctx.assets.transform(session.content)
ctx.logger.info(aaa)
return aaa
})
}
