English Cantonese Chinese Japanese
I’m ArsFy, full-stack development from Hong Kong
OutLook: [email protected]
- BackEnd: C, C++, Java, Golang, NodeJS, php, Python
- FrontEnd: html, javascript, css, react
- VS Code
- VS
- Android Studio
- Vim
telegram 隨機色圖 bot
Home Page: https://t.me/katonei_bot
English Cantonese Chinese Japanese
I’m ArsFy, full-stack development from Hong Kong
OutLook: [email protected]
环境:Debian 11 amd64
node:v14.20.0
imagemagick:v6.9.11.60
MongoDB:v5.0.10
"api_server": false
描述问题:inspect模式运行无异常告警,机器人正常响应/start与/status,并可以使用/addphoto 添加图片到photos文件夹。
输入/hentai命令,无响应;使用/getphoto命令可以读取photos文件夹内图片并发送。
操作系統: Ubuntu 20.04.5 LTS aarch64
node版本: v14.21.2
已正確配置 config.json , 且cookie有效
錯誤log如下:
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received null
at validateString (internal/validators.js:124:11)
at Url.parse (url.js:170:3)
at Object.urlParse [as parse] (url.js:157:13)
at dispatchHttpRequest (/var/lib/GFNKB/node_modules/axios/lib/adapters/http.js:124:22)
at new Promise (<anonymous>)
at httpAdapter (/var/lib/GFNKB/node_modules/axios/lib/adapters/http.js:48:10)
at dispatchRequest (/var/lib/GFNKB/node_modules/axios/lib/core/dispatchRequest.js:58:10)
at Axios.request (/var/lib/GFNKB/node_modules/axios/lib/core/Axios.js:108:15)
at wrap (/var/lib/GFNKB/node_modules/axios/lib/helpers/bind.js:9:15)
at /var/lib/GFNKB/getPixiv.js:29:34
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
code: 'ERR_INVALID_ARG_TYPE'
}
Telegram客戶端内顯示:
@chenjranyang 載入圖像時發生錯誤!目標可能不存在或伺服器故障
/katonei_bot/node_modules/whatwg-url/lib/encoding.js:2
const utf8Encoder = new TextEncoder();
^
ReferenceError: TextEncoder is not defined
at Object. (/katonei_bot/node_modules/whatwg-url/lib/encoding.js:2:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/katonei_bot/node_modules/whatwg-url/lib/url-state-machine.js:5:34)
at Module._compile (internal/modules/cjs/loader.js:778:30)
运行node main.js如图
config已填写好了
所有環境都已正確安裝并已配置完全 config.json
鍵入 node main.js 運行后報錯
下方為運行結果:
root@ubuntu:~/katonei_bot# node main.js
Start bot...
/root/katonei_bot/main.js:57
switch (result[0].type) {
^
TypeError: Cannot read property 'type' of undefined
at /root/katonei_bot/main.js:57:39
at /root/katonei_bot/node_modules/mongodb/lib/utils.js:424:9
at /root/katonei_bot/node_modules/mongodb/lib/cursor/abstract_cursor.js:257:32
at next (/root/katonei_bot/node_modules/mongodb/lib/cursor/abstract_cursor.js:497:16)
at /root/katonei_bot/node_modules/mongodb/lib/cursor/abstract_cursor.js:511:20
at /root/katonei_bot/node_modules/mongodb/lib/cursor/abstract_cursor.js:461:66
at /root/katonei_bot/node_modules/mongodb/lib/utils.js:424:9
at completeEndSession (/root/katonei_bot/node_modules/mongodb/lib/sessions.js:154:17)
at /root/katonei_bot/node_modules/mongodb/lib/sessions.js:166:13
at maybePromise (/root/katonei_bot/node_modules/mongodb/lib/utils.js:410:5)
at ClientSession.endSession (/root/katonei_bot/node_modules/mongodb/lib/sessions.js:133:41)
at cleanupCursor (/root/katonei_bot/node_modules/mongodb/lib/cursor/abstract_cursor.js:563:32)
at /root/katonei_bot/node_modules/mongodb/lib/cursor/abstract_cursor.js:461:24
at /root/katonei_bot/node_modules/mongodb/lib/cursor/aggregation_cursor.js:50:13
at /root/katonei_bot/node_modules/mongodb/lib/utils.js:424:9
at /root/katonei_bot/node_modules/mongodb/lib/operations/execute_operation.js:73:17
at /root/katonei_bot/node_modules/mongodb/lib/operations/execute_operation.js:178:21
at /root/katonei_bot/node_modules/mongodb/lib/cmap/connection_pool.js:277:25
at /root/katonei_bot/node_modules/mongodb/lib/sdam/server.js:212:17
at handleOperationResult (/root/katonei_bot/node_modules/mongodb/lib/sdam/server.js:335:20)
at Connection.onMessage (/root/katonei_bot/node_modules/mongodb/lib/cmap/connection.js:222:9)
at MessageStream.<anonymous> (/root/katonei_bot/node_modules/mongodb/lib/cmap/connection.js:63:60)
请问修改那个json文件里面的admin后面的id,是直接在下面修改吗?自有部署是什么意思?怎么操作呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.