From 783a357ad7ede52d53cc1b06470773763708db43 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Sat, 30 Nov 2024 11:37:56 +0100 Subject: [PATCH] remove unmaintained deprecated nodejs bot_base example #71 --- README.md | 1 - nodejs_bot_base/.gitignore | 4 -- nodejs_bot_base/README.MD | 30 --------- nodejs_bot_base/index.js | 10 --- nodejs_bot_base/package-lock.json | 104 ------------------------------ nodejs_bot_base/package.json | 15 ----- 6 files changed, 164 deletions(-) delete mode 100644 nodejs_bot_base/.gitignore delete mode 100644 nodejs_bot_base/README.MD delete mode 100644 nodejs_bot_base/index.js delete mode 100644 nodejs_bot_base/package-lock.json delete mode 100644 nodejs_bot_base/package.json diff --git a/README.md b/README.md index 34f170a..d90af31 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ An echo bot in multiple languages to get you started. | [deltabot-cli Python](./python_deltabot_cli) | `v1.131.4` | | [simplebot (python)](./python_simplebot_plugin) | `1.93.0 (simplebot 3.3.0)` | | [deltabot (python)](./python_deltabot_plugin) (unmaintained?) | `?` | -| [bot-base (node.js)](./nodejs_bot_base) (unmaintained) | `1.27.0` | The bot just echos your text messages when you send them to it as DM. diff --git a/nodejs_bot_base/.gitignore b/nodejs_bot_base/.gitignore deleted file mode 100644 index 20f2150..0000000 --- a/nodejs_bot_base/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/node_modules -config -db.sqlite -db.sqlite-blobs \ No newline at end of file diff --git a/nodejs_bot_base/README.MD b/nodejs_bot_base/README.MD deleted file mode 100644 index ba51489..0000000 --- a/nodejs_bot_base/README.MD +++ /dev/null @@ -1,30 +0,0 @@ -> **Info**: [`deltachat-node-bot-base`](https://github.com/deltachat-bot/deltachat-node-bot-base) is **currently unmaintained**, so if you want all newer features you should go with [`@deltachat/napi-jsonrpc`](https://github.com/deltachat/napi-jsonrpc). see [@deltachat/napi-jsonrpc Example](../nodejs_napi_jsonrpc) - -# Echo Bot - Nodejs Bot Base - -> This is an makes use of [`deltachat-node-bot-base`](https://github.com/deltachat-bot/deltachat-node-bot-base) an abstraction Layer over [`deltachat-node`](https://github.com/deltachat/deltachat-node) which does the initial setup for you. It is opinionated (makes some design decisions for you, like the used config module) -> If you want more control look at our other echo-bot example that uses `deltachat-node` directly: [Advanced Example](../nodejs_cffi) - -## First Time Setup - -install dependencies with `npm install` - -Configure the bot by writing its email-address and password into `config/local.json` like this: - -```json -{ - "email_address": "bot@example.net", - "email_password": "secretandsecure" -} -``` - -## Start The Bot - -run the bot: - -``` -node . -``` - -## Questions - -If you got any questions reach out to us: https://bots.delta.chat/contact.html diff --git a/nodejs_bot_base/index.js b/nodejs_bot_base/index.js deleted file mode 100644 index 97ce993..0000000 --- a/nodejs_bot_base/index.js +++ /dev/null @@ -1,10 +0,0 @@ -const { deltachat, log } = require("deltachat-node-bot-base"); - -// Start the deltachat core engine and handle incoming messages. -deltachat.start((chat, message) => { - log("Got a message: ", message.getText()); - if (deltachat.getChatContacts(chat.getId()).length === 1) { - // This is a 1-on-1 (aka "single") chat. - deltachat.sendMessage(chat.getId(), message.getText()); - } -}); diff --git a/nodejs_bot_base/package-lock.json b/nodejs_bot_base/package-lock.json deleted file mode 100644 index c969191..0000000 --- a/nodejs_bot_base/package-lock.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "name": "nodejs_bot_base", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/node": { - "version": "13.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.4.tgz", - "integrity": "sha512-oVeL12C6gQS/GAExndigSaLxTrKpQPxewx9bOcwfvJiJge4rr7wNaph4J+ns5hrmIV2as5qxqN8YKthn9qh0jw==" - }, - "config": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/config/-/config-3.2.6.tgz", - "integrity": "sha512-oDHjuBD4w4qrG/Rb0ghDeELz6u/NR0Jb0hP6tEEKWTC6e/mD+rXmPTdPPQMAjtgyo+p7ILb8MvTX/erbDuGzqA==", - "requires": { - "json5": "^1.0.1" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "deltachat-node": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/deltachat-node/-/deltachat-node-1.25.0.tgz", - "integrity": "sha512-dHaCpw23TdH7jTnLh6SLEBwi7vyxuupIIWTsPkecfhxsL8stxd751BrDwOqdfMZKnW6us7KR3sxo1Nc/mxrRXA==", - "requires": { - "debug": "^4.1.1", - "lodash.pick": "^4.4.0", - "mkdirp": "^0.5.1", - "napi-macros": "^2.0.0", - "node-gyp-build": "^4.1.0", - "typescript": "^3.7.5" - } - }, - "deltachat-node-bot-base": { - "version": "git://github.com/deltachat-bot/deltachat-node-bot-base.git#537e79e9cb27fa3ef51ec11ba5b203f58dbe75e2", - "from": "git://github.com/deltachat-bot/deltachat-node-bot-base.git", - "requires": { - "@types/node": "^13.7.4", - "config": "^3.2.5", - "deltachat-node": "^1.0.0-beta.26" - } - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "requires": { - "minimist": "^1.2.0" - } - }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "napi-macros": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", - "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==" - }, - "node-gyp-build": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.0.tgz", - "integrity": "sha512-4oiumOLhCDU9Rronz8PZ5S4IvT39H5+JEv/hps9V8s7RSLhsac0TCP78ulnHXOo8X1wdpPiTayGlM1jr4IbnaQ==" - }, - "typescript": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.2.tgz", - "integrity": "sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ==" - } - } -} diff --git a/nodejs_bot_base/package.json b/nodejs_bot_base/package.json deleted file mode 100644 index 536b830..0000000 --- a/nodejs_bot_base/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "nodejs_bot_base", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "deltachat-node-bot-base": "git://github.com/deltachat-bot/deltachat-node-bot-base.git" - } -}