feat: 兑换码

This commit is contained in:
bietiaop 2024-10-03 13:12:36 +08:00
parent c4d6d8a988
commit 9f8d5dc1f6
4 changed files with 143 additions and 1 deletions

27
apps/code.js Normal file
View file

@ -0,0 +1,27 @@
import { ZZZPlugin } from '../lib/plugin.js';
import settings from '../lib/settings.js';
import _ from 'lodash';
import { rulePrefix } from '../lib/common.js';
import { getCodeMsg } from '../lib/code.js';
export class Note extends ZZZPlugin {
constructor() {
super({
name: '[ZZZ-Plugin]Code',
dsc: 'zzzcode',
event: 'message',
priority: _.get(settings.getConfig('priority'), 'code', 70),
rule: [
{
reg: `${rulePrefix}(code|兑换码)$`,
fnc: 'code',
},
],
});
}
async code() {
const msg = await getCodeMsg();
await this.reply(msg);
return false;
}
}

View file

@ -187,6 +187,13 @@ const helpData = [
title: '其他',
icon: 'fire',
items: [
{
title: '兑换码',
desc: '获取前瞻兑换码',
needCK: false,
needSK: false,
commands: ['code', '兑换码'],
},
{
title: '绑定设备',
desc: '用于尝试解决10041报错等问题无法100%解决),需要发送设备信息,具体方法请发送%绑定设备帮助查看',