From a198c0694ce9896a8df54c25d0a9167e987b4112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=97?= <125703711+nashi23@users.noreply.github.com> Date: Sun, 6 Aug 2023 19:32:23 +0800 Subject: [PATCH] docs(FAQ,deployment-guide): update, typo fix (#312) Co-authored-by: Rongrong --- docs/FAQ.md | 6 +++++- docs/FAQ.zh.md | 10 +++++++--- docs/deployment-guide.md | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 8da6cd5a2a..e51645b97c 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -36,7 +36,11 @@ Using the bot in a group is possible even if you don't have the multi-user mode If you want to allow a certain user to use the bot, send `/user_info user_id` or `/user_info @username` to the bot and promote their to "User". If you want to allow a certain channel/group to use the bot, you should promote both the channel/group itself and at least one of its administrators to "User". Only the promoted administrators can operate the bot in the channel/group. -### **Q**: why did the bot automatically leave my channel/group? +### **Q**: Why did the bot automatically leave my channel/group? **A**: Once the bot finds itself lacking the permission to send messages (not granted or being blocked), it will immediately unsubscribe all subscriptions in this chat. Meanwhile, if this chat is a channel or group and the bot is still a member of it, it will leave the channel/group. Make sure to grant the bot enough permission (sending messages) in channel/group. + +### **Q**: My bot is not responding. I checked the log and saw Telethon complaining "Server sent a very new message with ID...", "Server replied with a wrong session ID...", or "Could not find a matching Constructor ID for the TLObject...". + +**A:** Telethon is protecting you from potential attacks. For details, please refer to [Telethon FAQ](https://docs.telethon.dev/en/stable/quick-references/faq.html#what-does-server-sent-a-very-new-message-with-id-mean). If you believe that it is caused by misconfiguration instead of attacks, and the bot is not deployed on a PaaS platform (e.g. Heroku, Railway), you may stop RSStT, delete the session file (`config/bot.session`), and restart it to solve the problem. diff --git a/docs/FAQ.zh.md b/docs/FAQ.zh.md index 5abf847643..020a42d5cd 100644 --- a/docs/FAQ.zh.md +++ b/docs/FAQ.zh.md @@ -36,7 +36,11 @@ 如果你想要允许某个用户使用 bot,向 bot 发送 `/user_info 用户ID` 或 `/user_info @用户名`,然后将他提升为「用户」。 如果你想要允许某个频道/群组使用 bot,你需要将频道/群组本身和至少一位它的管理员提升为提升为「用户」。只有被提升的管理员才可以在频道/群组里操作 bot。 -### **Q**: 为什么机器人自动退出了我的频道/群组? +### **Q**: 为什么 bot 自动退出了我的频道/群组? -**A**: 一旦机器人发现自身缺乏发送消息的权限(未授予或被屏蔽),它将立即退订该聊天中的所有订阅。与此同时,如果该聊天是频道或群组且机器人仍是成员,它将退出该频道/群组。 -确保在群组/频道中授予机器人足够的权限(发送消息)。 +**A**: 一旦 bot 发现自身缺乏发送消息的权限(未授予或被屏蔽),它将立即退订该聊天中的所有订阅。与此同时,如果该聊天是频道或群组且 bot 仍是成员,它将退出该频道/群组。 +确保在群组/频道中授予 bot 足够的权限(发送消息)。 + +### **Q**: 我的 bot 无响应。查看日志后发现 Telethon 在抱怨 "Server sent a very new message with ID...","Server replied with a wrong session ID...",或者 "Could not find a matching Constructor ID for the TLObject..."。 + +**A**: Telethon 正保护您免受潜在的攻击。欲知详情,请参阅 [Telethon FAQ](https://docs.telethon.dev/en/stable/quick-references/faq.html#what-does-server-sent-a-very-new-message-with-id-mean)。如果你确信问题并非由攻击引起,而只是由错误的配置引发,且 bot 并非部署于 PaaS 平台上(如 Heroku, Railway),你可以通过停止 RSStT,删除会话文件(`config/bot.session`),然后重启 RSStT 以解决这个问题。 diff --git a/docs/deployment-guide.md b/docs/deployment-guide.md index c7995c41ee..d4bff8f00e 100644 --- a/docs/deployment-guide.md +++ b/docs/deployment-guide.md @@ -148,7 +148,7 @@ python3 -m rsstt git clone https://github.com/Rongronggg9/RSS-to-Telegram-Bot.git cd RSS-to-Telegram-Bot pip3 install -r requirements.txt -cp .env.example .env +cp .env.sample .env vi .env # fill in env variables python3 -u telegramRSSbot.py ```