mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
feat: 兑换码
This commit is contained in:
parent
c4d6d8a988
commit
9f8d5dc1f6
4 changed files with 143 additions and 1 deletions
27
apps/code.js
Normal file
27
apps/code.js
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue