1 Star 0 Fork 0

OverTimeBunny/自用云崽JS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
赞助.js 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
OverTimeBunny 提交于 2024-07-19 03:25 . update 赞助.js.
import plugin from '../../lib/plugins/plugin.js';
import { segment } from 'oicq';
import path from 'path';
const currentPath = process.cwd();
class ViewOwnerPlugin extends plugin {
constructor() {
super({
name: '查看主人和赞助',
dsc: '响应查看主人和赞助指令,提供机器人主人的联系方式和赞助信息。',
event: 'message',
priority: -100,
rule: [
{
reg: '^#问题反馈$',
fnc: 'viewOwner'
},
{
reg: '^#赞助$',
fnc: 'sponsor'
}
]
});
this.imgPaths = {
viewOwner: path.join(currentPath, '/resources/OvertimeBunny/1.jpg'),
sponsor: path.join(currentPath, '/resources/OvertimeBunny/2.jpg')
};
console.log('ViewOwnerPlugin loaded'); // 确认插件加载
}
async viewOwner(e) {
await e.reply([
segment.image(`file://${this.imgPaths.viewOwner}`),
'有问题进帖子进行反馈。'
]);
}
async sponsor(e) {
await e.reply([
segment.image(`file://${this.imgPaths.sponsor}`),
'感谢您的赞助支持!'
]);
}
}
export default ViewOwnerPlugin;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/OvertimeBunny/self-use-yunzai-js.git
git@gitee.com:OvertimeBunny/self-use-yunzai-js.git
OvertimeBunny
self-use-yunzai-js
自用云崽JS
master

搜索帮助