New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koishi-plugin-teach

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koishi-plugin-teach - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

22

dist/index.js

@@ -58,3 +58,6 @@ "use strict";

__exportStar(require("./plugins/writer"), exports);
const cheatSheet = (p, authority, config) => `\
const cheatSheet = (session, config) => {
const { authority } = session.$user;
const { authority: a, prefix: p } = config;
return `\
教学系统基本用法:

@@ -72,7 +75,7 @@ 添加问答:${p} 问题 回答

 结果页码:   / page
 禁用递归查询: -R${authority >= config.authority.regExp ? `
 禁用递归查询: -R${authority >= a.regExp ? `
 正则+合并结果:${p}${p}${p}` : ''}${config.useContext ? `
上下文选项:
 允许本群:   -e
 禁止本群:   -d` : ''}${config.useContext && authority >= config.authority.context ? `
 禁止本群:   -d` : ''}${config.useContext && authority >= a.context ? `
 全局允许:   -E

@@ -82,5 +85,5 @@ 全局禁止:   -D

 无视上下文搜索:-G` : ''}
问答选项:${config.useWriter && authority >= config.authority.frozen ? `
问答选项:${config.useWriter && authority >= a.frozen ? `
 锁定问答:   -f/-F
 教学者代行:  -s/-S` : ''}${config.useWriter && authority >= config.authority.writer ? `
 教学者代行:  -s/-S` : ''}${config.useWriter && authority >= a.writer ? `
 设置问题作者: -w uid

@@ -90,3 +93,3 @@ 设置为匿名:  -W` : ''}

 重定向:    =>
匹配规则:${authority >= config.authority.regExp ? `
匹配规则:${authority >= a.regExp ? `
 正则表达式:  -x/-X` : ''}

@@ -114,5 +117,6 @@ 严格匹配权重: -p prob

 %a:@说话人
 %m:@四季酱
 %m:@${session.$app.options.nickname[0]}
 %s:说话人的名字
 %{}: 指令插值`;
 %{}:指令插值`;
};
exports.name = 'teach';

@@ -174,3 +178,3 @@ function registerPrefix(ctx, prefix) {

.userFields(['authority', 'id'])
.usage(({ $user }) => cheatSheet(config.prefix, $user.authority, config))
.usage(session => cheatSheet(session, config))
.action(async ({ options, session, args }) => {

@@ -177,0 +181,0 @@ const argv = { app: ctx.app, session, args, config, options };

{
"name": "koishi-plugin-teach",
"description": "Teach plugin for Koishi",
"version": "1.3.0",
"version": "1.3.1",
"main": "dist/index.js",

@@ -41,3 +41,3 @@ "typings": "dist/index.d.ts",

"peerDependencies": {
"koishi-core": "^2.5.0",
"koishi-core": "^2.5.1",
"koishi-utils": "^3.2.1"

@@ -44,0 +44,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc