Taosky / telegram-search-bot

A telegram group record search bot that solves the problem of direct search inability in languages such as CJK / Telegram 群聊天记录搜索Bot,解决CJK等语言无法直接搜索问题
MIT License
375 stars 49 forks source link

盼增频道搜索的功能 #54

Open 0bo opened 10 months ago

0bo commented 10 months ago

您好,

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

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

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

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

tsaoshuang commented 9 months ago

同求

wsnsnsns commented 6 months ago

同求

Taosky commented 6 months ago

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

Radisnt01 commented 5 months ago

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


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'```
Taosky commented 5 months ago

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

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'```

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