-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: integrates KOOK platform adapter #5658
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
Merged
Soulter
merged 37 commits into
AstrBotDevs:master
from
shuiping233:feat/astrbot_plugin_kook_adapter
Mar 3, 2026
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
16c81a4
feat: 将kook适配器插件并入astrbot官方适配器目录中
shuiping233 864a881
refactor: 重命名函数名为 _warp_message
shuiping233 fd9b6a6
refactor: 使用Protocol替换Union类型
shuiping233 2b3c86c
bugfix: 修复base64前缀处理问题
shuiping233 33a2f5d
refactor: 抛出的错误不再包含"[kook]"
shuiping233 162aab0
refactor: 添加读取本地文件时的路径安全检查
shuiping233 6f3172c
refactor: 卡片消息解析失败时会打印错误信息
shuiping233 5a3f2d1
refactor: 添加处理接收卡片消息内的图片url时的安全校验
shuiping233 deaa162
refactor: 安全处理ws需要重连的情况
shuiping233 e22914c
Revert "refactor: 使用Protocol替换Union类型"
shuiping233 91dc1ad
feat: 添加获取机器人名称的实现
shuiping233 8de9b26
refactor: 让send_by_session发送主动消息时正确传入当前消息链的文本消息内容
shuiping233 88c1e6d
refactor: 统一处理适配器配置相关内容,处理仪表盘出传入配置,并添加仪表盘的kook适配器配置页面的i18n文本
shuiping233 a96d819
unittest: 添加kook适配器的单元测试,虽然没覆盖多少单测
shuiping233 c556240
unittest: TEST_DATA_DIR用更安全的路径
shuiping233 68402f5
refactor: KookConfig使用了更好的默认值处理方式
shuiping233 ce88a8b
refactor: 移除kook_adapter 的config字段重复定义
shuiping233 64ebec5
refactor: 隐藏获取kook gateway时url里的token,防止把token打印出来
shuiping233 55ce048
refactor: KookConfig.pretty_jsons使用*来屏蔽token内容
shuiping233 36f2f6c
bugfix: 修复主动发送消息时,调用了父方法`send_by_session`可能导致指标被重复上传的bug
shuiping233 07b3840
refactor: 优化upload_asset的路径处理报错
shuiping233 831afca
bugfix: 修复kook ws心跳间隔可能会出现负数时间的bug
shuiping233 aacc2a1
refactor: KookClient移到KookPlatformAdapter.__init__里初始化
shuiping233 c5be9d3
bugfix: 修复处理base64 url 多替换了/而报错的bug
shuiping233 cb2d83a
refactor: kook适配器上传文件失败时,会抛出错误
shuiping233 dace3f0
chore: 移除一条注释
shuiping233 6c245c0
refactor: 移除没用的return
shuiping233 9a95607
refactor: 即使消息链中有消息发送失败了,也尽可能将其他消息发送出去,并把报错信息也发送出去
shuiping233 1ee409b
refactor: 增强上传任务失败时的错误处理,使其发生错误时尽力而为发送其余消息
shuiping233 3e17643
refactor: 发送到消息频道的报错消息加了个⚠️,小巧思这块?
shuiping233 e72aa75
refactor: 咱们在写适配器啊,要什么小巧思呢,小巧思给上游插件开发弄不好么)
shuiping233 d7d6f79
Merge remote-tracking branch 'origin/master' into feat/astrbot_plugin…
Soulter 86e5eaf
refactor: enhance Kook adapter with kmarkdown parsing and improve fil…
Soulter 877f591
refactor: extract card message parsing logic into a separate method
Soulter 04292fd
feat: add kook_bot_nickname configuration to ignore messages from spe…
Soulter a63fa83
refactor: remove commented-out code and clean up file upload error ha…
Soulter e6ba594
fix: remove redundant prefix handling for file URLs in asset upload
Soulter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
机器人的名字要修改的话应该是在kook机器人控制台里改的,
KookClient里有个get_bot_info能通过kook接口拿到自身bot_id和bot_name,我不知道为什么明明我拿了bot_name却没拿来用上,但是有bot_name的话应该就不用用户手动填kook_bot_nickname进来了吧,也省的用户改了kook那边机器人名称,但是忘了改kook适配器配置)