Commit dc57fa1b authored by nanahira's avatar nanahira

thirdeye and plugin Selection thing

parent 734bba60
......@@ -4,28 +4,9 @@ import { Show } from './playbook/Show';
import { Playbook } from './playbook/Playbook';
import { plainToClass } from 'class-transformer';
import loadJsonFile from 'load-json-file';
import { MaybeArray } from 'koishi';
import { Selection } from 'koishi';
import type { OneBotBot } from '@koishijs/plugin-adapter-onebot';
const selectors = [
'user',
'guild',
'channel',
'self',
'private',
'platform',
] as const;
type SelectorType = typeof selectors[number];
type SelectorValue = boolean | MaybeArray<string | number>;
type BaseSelection = { [K in SelectorType as `$${K}`]?: SelectorValue };
export interface Selection extends BaseSelection {
$and?: Selection[];
$or?: Selection[];
$not?: Selection;
}
export interface PluginConfig {
adminContext?: Selection;
autoChangeName?: boolean;
......
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