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 0.1.5 to 0.1.6

5

dist/broadcast.js

@@ -5,3 +5,2 @@ "use strict";

const koishi_utils_1 = require("koishi-utils");
const BROADCAST_INTERVAL = 1000;
const defaultOptions = {

@@ -26,6 +25,6 @@ authority: 4,

const groups = assignMap[id];
const { sender } = koishi_core_1.apps[id];
const { sender } = koishi_core_1.appMap[id];
for (let index = 0; index < groups.length; index++) {
if (index)
await koishi_utils_1.sleep(BROADCAST_INTERVAL);
await koishi_utils_1.sleep(options.broadcastInterval);
await sender.sendGroupMsg(groups[index], message);

@@ -32,0 +31,0 @@ }

6

package.json
{
"name": "koishi-plugin-common",
"version": "0.1.5",
"version": "0.1.6",
"main": "dist/index.js",

@@ -27,5 +27,5 @@ "typings": "dist/index.d.ts",

"dependencies": {
"koishi-core": "^0.2.3",
"koishi-utils": "^0.1.6"
"koishi-core": "^0.2.4",
"koishi-utils": "^0.1.7"
}
}

@@ -1,6 +0,4 @@

import { Context, apps, CommandConfig } from 'koishi-core'
import { Context, appMap, CommandConfig } from 'koishi-core'
import { sleep } from 'koishi-utils'
const BROADCAST_INTERVAL = 1000
export interface BroadcastOptions extends CommandConfig {

@@ -29,5 +27,5 @@ broadcastInterval?: number

const groups = assignMap[id]
const { sender } = apps[id]
const { sender } = appMap[id]
for (let index = 0; index < groups.length; index++) {
if (index) await sleep(BROADCAST_INTERVAL)
if (index) await sleep(options.broadcastInterval)
await sender.sendGroupMsg(groups[index], message)

@@ -34,0 +32,0 @@ }

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