Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property "_embedded" from null #3

Open
fengnz opened this issue Dec 19, 2019 · 7 comments
Open

TypeError: Cannot read property "_embedded" from null #3

fengnz opened this issue Dec 19, 2019 · 7 comments

Comments

@fengnz
Copy link
Owner

fengnz commented Dec 19, 2019

用 /initdb 命令初始化数据库成功
但运行代码出现:
TypeError: Cannot read property "_embedded" from null.(第 130 行,“Mongo”文件)
日志里全是下面这个样:
message": "Request failed for https://api.telegram.org returned code 400. Truncated server response: {"ok":false,"error_code":400,"description":"Bad Request: message text is empty"} (use muteHttpExceptions option to examine full response)"

Originally posted by @buttt5460 in #1 (comment)

@fengnz
Copy link
Owner Author

fengnz commented Dec 19, 2019

这要看你是怎么运行的了, 机器人代码不能直接在GAS里面运行, 你需要发布它, 然后在使用. /initdb 成功的话, 说明你发布和绑定都有成功. 这个时候你不应该去运行代码. 而是直接在机器人里输入 /admin 看看有没有响应.

@buttt5460
Copy link

机器人在群里输入/ admin有响应,能打开"欢迎词设置""进群验证"并设置.
现在的问题是,群里聊天的内容记录不到logs里面!

@buttt5460
Copy link

但我参照您视屏"连接 RestHeart MongoDB 数据库",自建了数据库并绑定另一个机器人,所有聊天记录都能在logs里找到,说明数据库没问题

@fengnz
Copy link
Owner Author

fengnz commented Dec 19, 2019

厉害哦,居然成功建了数据库. 那问题就不大了, 只是没有记录到LOGS里面的话, 应该是机器人里没有把聊天记录到LOGS里面. 也许就没有这样的代码, 或者这行代码被注释掉了. 应该是没有启用的, 不然我的数据库早就炸了.

@buttt5460
Copy link

我是在这下载的啊!除了改CONST里面机器人ID,数据库地址,其它没动过.
还是日志什么都记录不了,头痛啊

@buttt5460
Copy link

刚弄好了,是缺少了代码.
少了代码你们还能用啊,晕

@fengnz
Copy link
Owner Author

fengnz commented Dec 22, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants