Taosky/telegram-search-bot

盼增频道搜索的功能

Opened this issue · 5 comments

0bo commented

您好,

非常感谢制作这么棒的工具,解决了中文搜索大麻烦。

测试了一下,将bot作为管理员加入频道,貌似没有办法激活搜索。

后续是否可能增加相应功能?

早期建立的几个个人收藏都是频道类型的,没有用群组模式 😢 唉。。。

同求

同求

由于频道和群组差异较大,现有代码再去兼容有点困难,准备新建一个项目实现😞

在群组使用频道身份发言的似乎也无法搜索到,并且还会报错

2024-04-12 15:25:26 tgbot  | Traceback (most recent call last):
2024-04-12 15:25:26 tgbot  |   File "/usr/local/lib/python3.9/site-packages/telethon/client/updates.py", line 543, in _dispatch_update
2024-04-12 15:25:26 tgbot  |     await callback(event)
2024-04-12 15:25:26 tgbot  |   File "/app/userbot.py", line 130, in handle_edit_message
2024-04-12 15:25:26 tgbot  |     from_id = event.from_id.user_id
2024-04-12 15:25:26 tgbot  | AttributeError: 'PeerChannel' object has no attribute 'user_id'```

在群组使用频道身份发言的似乎也无法搜索到,并且还会报错

2024-04-12 15:25:26 tgbot  | Traceback (most recent call last):
2024-04-12 15:25:26 tgbot  |   File "/usr/local/lib/python3.9/site-packages/telethon/client/updates.py", line 543, in _dispatch_update
2024-04-12 15:25:26 tgbot  |     await callback(event)
2024-04-12 15:25:26 tgbot  |   File "/app/userbot.py", line 130, in handle_edit_message
2024-04-12 15:25:26 tgbot  |     from_id = event.from_id.user_id
2024-04-12 15:25:26 tgbot  | AttributeError: 'PeerChannel' object has no attribute 'user_id'```

还有这种操作,有空看看。