Commit c365d406 authored by nanahira's avatar nanahira

remove adminCtx

parent f62d532e
......@@ -8,9 +8,7 @@ import { Selection } from 'koishi';
import type { OneBotBot } from '@koishijs/plugin-adapter-onebot';
export interface PluginConfig {
adminContext?: Selection;
autoChangeName?: boolean;
dropHelp?: boolean;
playbookPathPrefix?: string;
}
......@@ -38,11 +36,7 @@ export class MyPlugin {
apply(ctx: Context, config: PluginConfig) {
this.ctx = ctx;
this.config = config;
if (this.config.dropHelp) {
ctx.command('help').dispose();
}
this.adminCtx = this.ctx.select(this.config.adminContext);
const showComamnd = this.adminCtx
const showComamnd = this.ctx
.command('act [groupId:string]', '获取公演状态')
.usage('不带参数获取所有正在公演的群,带参数则获取特定群。')
.action((argv, groupId) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment