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

koishi-plugin-common

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koishi-plugin-common - npm Package Compare versions

Comparing version 3.0.0-alpha.9 to 3.0.0-alpha.10

8

dist/contextify.js

@@ -72,2 +72,10 @@ "use strict";

}
if (options.group) {
const info = await ctx.sender.getGroupMemberInfo(ctxId, newMeta.userId).catch(() => ({}));
Object.assign(newMeta.sender, info);
}
else if (options.user) {
const info = await ctx.sender.getStrangerInfo(newMeta.userId).catch(() => ({}));
Object.assign(newMeta.sender, info);
}
// generate path

@@ -74,0 +82,0 @@ Object.defineProperty(newMeta, '$ctxId', { value: ctxId });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const koishi_utils_1 = require("koishi-utils");
function default_1(ctx) {
ctx.command('echo <message...>', '向多个上下文发送广播', { authority: 2 })
.option('-a, --anonymous', '匿名发送消息')
.option('-A, --force-anonymous', '匿名发送消息')
.option('-u, --user <id>', '指定信息发送的目标 QQ 号', { isString: true, authority: 4 })

@@ -20,2 +23,8 @@ .option('-g, --group <id>', '指定信息发送的目标群号', { isString: true, authority: 4 })

}
if (options.forceAnonymous) {
message = koishi_utils_1.CQCode.stringify('anonymous') + message;
}
else if (options.anonymous) {
message = koishi_utils_1.CQCode.stringify('anonymous', { ignore: true }) + message;
}
// send messages

@@ -22,0 +31,0 @@ return Promise.all([

10

package.json
{
"name": "koishi-plugin-common",
"description": "Common plugins for Koishi",
"version": "3.0.0-alpha.9",
"version": "3.0.0-alpha.10",
"main": "dist/index.js",

@@ -31,9 +31,9 @@ "typings": "dist/index.d.ts",

"devDependencies": {
"koishi-database-memory": "^2.0.0-alpha.9",
"koishi-test-utils": "^4.0.0-alpha.9"
"koishi-database-memory": "^2.0.0-alpha.10",
"koishi-test-utils": "^4.0.0-alpha.10"
},
"dependencies": {
"koishi-core": "^2.0.0-alpha.9",
"koishi-utils": "^1.0.6"
"koishi-core": "^2.0.0-alpha.10",
"koishi-utils": "^1.0.7"
}
}

@@ -75,2 +75,10 @@ import { Context, getTargetId, ContextType } from 'koishi-core'

if (options.group) {
const info = await ctx.sender.getGroupMemberInfo(ctxId, newMeta.userId).catch(() => ({}))
Object.assign(newMeta.sender, info)
} else if (options.user) {
const info = await ctx.sender.getStrangerInfo(newMeta.userId).catch(() => ({}))
Object.assign(newMeta.sender, info)
}
// generate path

@@ -77,0 +85,0 @@ Object.defineProperty(newMeta, '$ctxId', { value: ctxId })

import { MetaTypeMap, Context } from 'koishi-core'
import { CQCode } from 'koishi-utils'
export default function (ctx: Context) {
ctx.command('echo <message...>', '向多个上下文发送广播', { authority: 2 })
.option('-a, --anonymous', '匿名发送消息')
.option('-A, --force-anonymous', '匿名发送消息')
.option('-u, --user <id>', '指定信息发送的目标 QQ 号', { isString: true, authority: 4 })

@@ -22,2 +25,8 @@ .option('-g, --group <id>', '指定信息发送的目标群号', { isString: true, authority: 4 })

if (options.forceAnonymous) {
message = CQCode.stringify('anonymous') + message
} else if (options.anonymous) {
message = CQCode.stringify('anonymous', { ignore: true }) + message
}
// send messages

@@ -24,0 +33,0 @@ return Promise.all([

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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