@atri-bot/plugin-ping 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # atri-plugin-ping
2
+
3
+ 测试机器人是否在线插件
package/dist/index.d.ts CHANGED
@@ -10,11 +10,7 @@ interface PingCommandContext {
10
10
  };
11
11
  }
12
12
  declare class Plugin extends BasePlugin<PingConfig> {
13
- pluginName: string;
14
- disableAutoLoadConfig: boolean;
15
- defaultConfig: {
16
- defaultReply: string;
17
- };
13
+ defaultConfig: PingConfig;
18
14
  load(): void;
19
15
  unload(): void;
20
16
  private handlePingCommand;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{BasePlugin as o}from"@atri-bot/core";import{Command as i}from"commander";import{Structs as m}from"node-napcat-ts";var n=class extends o{pluginName="ping";disableAutoLoadConfig=!1;defaultConfig={defaultReply:"pong"};load(){this.regCommandEvent({commandName:"ping",commander:new i().description("\u6D4B\u8BD5\u673A\u5668\u4EBA\u662F\u5426\u5728\u7EBF").argument("[reply]","\u56DE\u590D\u5185\u5BB9").option("-r, --reply [reply]","\u56DE\u590D\u5185\u5BB9"),callback:this.handlePingCommand.bind(this)})}unload(){}async handlePingCommand({context:a,args:e,params:t}){await this.bot.sendMsg(a,[m.text(e[0]??t.reply??this.config.defaultReply)])}};export{n as Plugin};
1
+ import{BasePlugin as o}from"@atri-bot/core";import{Command as i}from"commander";import{Structs as m}from"node-napcat-ts";var n=class extends o{defaultConfig={defaultReply:"pong"};load(){this.regCommandEvent({commandName:"ping",commander:new i().description("\u6D4B\u8BD5\u673A\u5668\u4EBA\u662F\u5426\u5728\u7EBF").argument("[reply]","\u56DE\u590D\u5185\u5BB9").option("-r, --reply [reply]","\u56DE\u590D\u5185\u5BB9"),callback:this.handlePingCommand.bind(this)})}unload(){}async handlePingCommand({context:a,args:e,params:t}){await this.bot.sendMsg(a,[m.text(e[0]??t.reply??this.config.defaultReply)],{reply:!1,at:!1})}};export{n as Plugin};
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
- {
2
- "name": "@atri-bot/plugin-ping",
3
- "version": "1.1.0",
4
- "description": "ping plugin for atri framework",
5
- "author": "huan_kong",
6
- "license": "MIT",
7
- "type": "module",
8
- "main": "./dist/index.js",
9
- "types": "./dist/index.d.ts",
10
- "files": [
11
- "./dist/**/*"
12
- ],
13
- "scripts": {
14
- "build": "tsup",
15
- "clean": "rimraf dist",
16
- "lint": "eslint",
17
- "lint:fix": "eslint --fix",
18
- "type-check": "tsc --noEmit -p tsconfig.json --composite false"
19
- },
20
- "dependencies": {
21
- "@atri-bot/core": "^1.1.2",
22
- "@huan_kong/logger": "^1.0.6",
23
- "commander": "^14.0.0",
24
- "node-napcat-ts": "^0.4.19"
25
- }
26
- }
1
+ {
2
+ "name": "@atri-bot/plugin-ping",
3
+ "version": "1.1.2",
4
+ "description": "ping plugin for atri framework",
5
+ "author": "huan_kong",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "files": [
11
+ "./dist/**/*"
12
+ ],
13
+ "scripts": {
14
+ "build": "pnpm run type-check && pnpm run lint && tsup",
15
+ "clean": "rimraf dist",
16
+ "lint": "eslint",
17
+ "lint:fix": "eslint --fix",
18
+ "type-check": "tsc --noEmit -p tsconfig.json --composite false"
19
+ },
20
+ "dependencies": {
21
+ "@atri-bot/core": "^1.1.9",
22
+ "@huan_kong/logger": "^1.0.6",
23
+ "commander": "^14.0.0",
24
+ "node-napcat-ts": "^0.4.19"
25
+ }
26
+ }