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

Bug: Telegram 适配器似乎不会响应一些种类的信息 #1439

Closed
Ikaleio opened this issue Aug 8, 2024 · 7 comments
Closed

Bug: Telegram 适配器似乎不会响应一些种类的信息 #1439

Ikaleio opened this issue Aug 8, 2024 · 7 comments

Comments

@Ikaleio
Copy link

Ikaleio commented Aug 8, 2024

Describe the bug

如题。

Steps to reproduce

Telegram 中创建一个群聊,将机器人拉入。

例如,我群聊中机器人的名字设置为「香草」,指令前缀为「/」

  1. 群聊中发送 /help,观察到机器人正确地回复帮助信息。
2024-08-08 13:37:20 [D] telegram receive {"update_id":612421424,"message":{"message_id":235,"from":{"id":5420165211,"is_bot":false,"first_name":"d0j1a1701","username":"d0j1a1701","language_code":"zh-hans","is_premium":true},"chat":{"id":-1002201482660,"title":"「香草」测试群","type":"supergroup"},"date":1723095440,"text":"/help","entities":[{"offset":0,"length":5,"type":"bot_command"}]}}
2024-08-08 13:37:20 [D] telegram [request] sendMessage(后面为帮助信息)
  1. 群聊中发送 香草 help,观察到机器人无反应
2024-08-08 13:40:54 [D] telegram receive {"update_id":612421435,"message":{"message_id":253,"from":{"id":5420165211,"is_bot":false,"first_name":"d0j1a1701","username":"d0j1a1701","language_code":"zh-hans","is_premium":true},"chat":{"id":-1002201482660,"title":"「香草」测试群","type":"supergroup"},"date":1723095654,"text":"香草 help"}}
2024-08-08 13:40:54 [D] telegram [request] getUpdates { offset: 612421436, timeout: 25 }
  1. 群聊中点击菜单发送 /help@KagusaBot,观察到机器人无反应(错误的将 @ 视为命令的一部分,但是 Telegram 默认会在点击机器人命令菜单时以这样的方式发送命令)
2024-08-08 13:47:32 [D] telegram receive {"update_id":612421437,"message":{"message_id":255,"from":{"id":5420165211,"is_bot":false,"first_name":"d0j1a1701","username":"d0j1a1701","language_code":"zh-hans","is_premium":true},"chat":{"id":-1002201482660,"title":"「香草」测试群","type":"supergroup"},"date":1723096052,"text":"/help@KagusaBot","entities":[{"offset":0,"length":15,"type":"bot_command"}]}}
2024-08-08 13:47:32 [D] telegram [request] getUpdates { offset: 612421438, timeout: 25 }
  1. 群聊中手动 @ 机器人发送 /help,观察到机器人无反应
2024-08-08 13:47:54 [D] telegram receive {"update_id":612421438,"message":{"message_id":256,"from":{"id":5420165211,"is_bot":false,"first_name":"d0j1a1701","username":"d0j1a1701","language_code":"zh-hans","is_premium":true},"chat":{"id":-1002201482660,"title":"「香草」测试群","type":"supergroup"},"date":1723096074,"text":"@KagusaBot help","entities":[{"offset":0,"length":10,"type":"mention"}]}}
2024-08-08 13:47:54 [D] telegram [request] getUpdates { offset: 612421439, timeout: 25 }
  1. 安装 chatluna 插件(会回复一切以机器人名字开头的消息),群聊内发送 香草 你好,观察到机器人无反应。

Expected behavior

image

image

image

这是 Onebot 适配器(NapCat 接入)的效果

Screenshots

No response

Versions

System:
OS: Linux 5.15 Alpine Linux
CPU: (4) x64 AMD EPYC 7B13 64-Core Processor

Binaries:
Node: 20.14.0
Yarn: 4.1.1

Koishi:
Core: 4.17.10
Console: 5.29.3

Telegram 适配器 4.5.4

Additional context

No response

@Ikaleio Ikaleio added the bug BUG label Aug 8, 2024
@Ikaleio
Copy link
Author

Ikaleio commented Aug 8, 2024

似乎忽视了 text 键的内容?

@shigma
Copy link
Member

shigma commented Aug 13, 2024

2 4 5 是因为你可能开了 privacy mode(还是说关了),导致 bot 收不到任何 at 以外的消息。

@shigma
Copy link
Member

shigma commented Aug 13, 2024

3 已修复,请更新适配器到 4.5.5 版本。

@Ikaleio
Copy link
Author

Ikaleio commented Aug 14, 2024

不是啊 你看日志 它收到消息了 只是无反应

@shigma
Copy link
Member

shigma commented Aug 15, 2024

1 香草 help 没有这种用法吧?你在哪里看到的可以这么用?

4 与 telegram 近期的更新有关,我研究一下。

5 能不能触发与插件相关,建议前往插件仓库提交 issue。

顺便,确定一个行为是不是预期的,可以在沙盒中调试。如果沙盒中不能触发 1 和 5 说明是预期行为。

@Ikaleio
Copy link
Author

Ikaleio commented Aug 17, 2024

1 香草 help 没有这种用法吧?你在哪里看到的可以这么用?

4 与 telegram 近期的更新有关,我研究一下。

5 能不能触发与插件相关,建议前往插件仓库提交 issue。

顺便,确定一个行为是不是预期的,可以在沙盒中调试。如果沙盒中不能触发 1 和 5 说明是预期行为。

似乎在tg适配器更新后全部都可以触发了 感谢

@MaikoTan
Copy link
Member

Looks like this issue has been solved, closing.

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

No branches or pull requests

3 participants