| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2024-03-29 | 5.0 kB | |
| v2.6.0_ Upload media to Telegraph, management enhancements source code.tar.gz | 2024-03-29 | 4.3 MB | |
| v2.6.0_ Upload media to Telegraph, management enhancements source code.zip | 2024-03-29 | 4.4 MB | |
| Totals: 3 Items | 8.7 MB | 0 | |
Highlights
- Upload media to Telegraph: When generating Telegraph posts, images as well as videos will be uploaded to Telegraph. This is to solve anti-hotlinking issues and improve the load performance of posts. This feature depends on the latest version of the media relay server (Rongronggg9/rsstt-img-relay). Those images and videos that are too large to be uploaded will still be proxied by
wsrv.nl(environment variableIMAGES_WESERV_NL) or media relay server (environment variableIMG_RELAY_SERVER). Thanks #431 for inspiration.
Addition
- Multiple managers: The environment variable
MANAGERnow accepts a single user ID as well as a list separated by;,,,(space),(linebreak), or(tab). Each user in the list will be able to manage the bot equally. - Customizable error logging chat: Previously, some error logs were always sent to the bot manager. To make it more flexible, a new environment variable
ERROR_LOGGING_CHAT, accepting a single user/channel/group ID, has been added. If set, these error logs will be sent to the specified chat. Otherwise, the first user ID inMANAGERwill be selected as default.
Enhancements
- Strip whitespaces in
<li>: Strip whitespaces (including linebreaks) in<li>(list item) to improve readability. Only the leading and trailing whitespaces (including linebreaks) are stripped. - Only set "force reply" in groups: Only set
ReplyKeyboardForceReplytoTruein groups. Previously, it was also set in private chats. See also "Bug fixes" below. - Minor refactor: Some internal functions have been refactored to improve readability and maintainability.
Bug fixes
- (
/sub) "force reply" not cleared: Both/suband/importsetReplyKeyboardForceReplytoTrueto force the user to reply to the bot. However, due to a bug of Telegram, it keeps effective even if the user has made a reply, making the reply bar always reappear. Previously, a workaround has been applied to/importby deleting the prompt message containingReplyKeyboardForceReplyafter the user has made a reply (see also #170). But/subwas forgotten at that time. Now the workaround has been applied to/subtoo. - "Remote"
/langunavailable: Fix a bug preventing users from using the/langcommand "remotely".
v2.6.0: 上传媒体到 Telegraph、管理增强
亮点
- 上传媒体到 Telegraph: 在生成 Telegraph 文章时,图片和视频都将被上传到 Telegraph。这是为了解决防盗链问题和提高文章的加载性能。此功能依赖媒体反代服务器 (Rongronggg9/rsstt-img-relay) 的最新版本。由于太大而无法上传的图片和视频仍将由
wsrv.nl(环境变量IMAGES_WESERV_NL) 或媒体反代服务器 (环境变量IMG_RELAY_SERVER) 进行代理。感谢 #431 的启发。
新增功能
- 多个管理员: 环境变量
MANAGER现在既接受单个用户 ID,也接受由;,,,(空格),(换行)或(制表符)分隔的列表。列表中的每个用户都可以平等地管理机器人。 - 可自定义的错误日志会话: 先前,一些错误日志总是发送到 bot 管理员。为了使其更加灵活,添加了一个新的环境变量
ERROR_LOGGING_CHAT,其接受单个用户/频道/群组 ID。如果被设置,这些错误日志将被发送到指定的会话。否则,将选择MANAGER中的第一个用户 ID 作为默认值。
增强
- 除去
<li>中的表层空格: 除去<li>(列表项) 中的表层空格 (包括换行符) 以提高可读性。只有前导和尾随空格 (包括换行符) 被除去。 - 只在群组中设置“强制回复”: 只在群组中设置
ReplyKeyboardForceReply为True。先前,它也在私聊中被设置。另请参阅下面的“Bug 修复”。 - 次要的重构: 重构了一些内部函数以提高可读性和可维护性。
Bug 修复
- (
/sub) “强制回复”未被清除:/sub和/import都将ReplyKeyboardForceReply设置为True以强制用户回复 bot。然而,由于 Telegram 的一个 bug,即使用户已经回复过了,它仍然有效,导致回复栏总是重新出现。先前,通过在用户回复后删除包含ReplyKeyboardForceReply的提示消息,为/import应用了变通解决方案 (另请参阅 #170)。但是/sub在那时被遗忘了。现在,这个变通解决方案也被应用到了/sub上。 - “远程”
/lang不可用:修复阻止用户“远程”使用/lang命令的错误。