From a82ead80041750fc0a19629d64737f0e0aa7c81a Mon Sep 17 00:00:00 2001 From: YunYouJun Date: Sun, 18 Oct 2020 17:48:40 +0800 Subject: [PATCH] :arrow_up: upgrade el-bot@0.5.7 --- README.md | 16 +++++++++++++--- el/index.js | 1 + package.json | 11 +++++------ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 944d59a..7929108 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ![GitHub package.json version](https://img.shields.io/github/package-json/v/ElpsyCN/el-bot-template) [![QQ Group](https://img.shields.io/badge/qq%20group-707408530-12B7F5)](https://shang.qq.com/wpa/qunwpa?idkey=5b0eef3e3256ce23981f3b0aa2457175c66ca9194efd266fd0e9a7dbe43ed653) [![telegram](https://img.shields.io/badge/telegram-elpsy__cn-blue)](https://t.me/elpsy_cn) +[![docs](https://github.com/ElpsyCN/el-bot-docs/workflows/docs/badge.svg)](https://docs.bot.elpsy.cn) 本仓库为包含 [mirai](https://github.com/mamoe/mirai) 与 [el-bot](https://github.com/ElpsyCN/el-bot) 的基础可运行模版。 并在 `package.json` 中预置了几个简单的脚本。 @@ -142,7 +143,16 @@ npm run start ### Webhook -```sh -npm run webhook -# yarn webhook +- `enable`: 是否启用 + +```js +// el/index.js +module.exports = { + webhook: { + enable: true, + path: "/webhook", + port: 7777, + secret: "el-psy-congroo", + }, +}; ``` diff --git a/el/index.js b/el/index.js index c874a28..185102f 100644 --- a/el/index.js +++ b/el/index.js @@ -20,6 +20,7 @@ module.exports = { config: utils.config.parse(resolve(__dirname, "./index.yml")), // webhook webhook: { + enable: true, path: "/webhook", port: 7777, secret: "el-psy-congroo", diff --git a/package.json b/package.json index 8aabb27..c801731 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,7 @@ "start:bot": "el start bot", "start:mirai": "el start mirai", "install:mirai": "el install mirai", - "lint": "eslint --fix . && prettier --write .", - "webhook": "el start webhook" + "lint": "eslint --fix . && prettier --write ." }, "repository": { "type": "git", @@ -33,13 +32,13 @@ }, "homepage": "https://github.com/ElpsyCN/el-bot-template#readme", "dependencies": { - "el-bot": "0.5.2" + "el-bot": "0.5.7" }, "devDependencies": { "dotenv": "^8.2.0", - "eslint": "^7.9.0", - "eslint-config-prettier": "^6.11.0", - "nodemon": "^2.0.4", + "eslint": "^7.11.0", + "eslint-config-prettier": "^6.13.0", + "nodemon": "^2.0.5", "prettier": "^2.1.2" } }