mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-15 12:47:48 +00:00
26 lines
634 B
JavaScript
26 lines
634 B
JavaScript
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 Code 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();
|
|
return this.reply(msg);
|
|
}
|
|
}
|